In the book Linux device drivers 3rd edition, the mutex is implemented by semaphore via init_MUTEX(sem)
. The newer kernel, such as kernel 3.2.X, however, has removed this function and added the support of mutex.
But when I encounter the codes:
if (down_interruptible(&sem))
return -ERESTARTSYS;
I can't ensure that whether there is a counterpart of this method for mutex. In other words, how can I interrupt the waiting on particular mutex?