The mutex_lock_interruptible() function in the linux kernel basically tries to lock a mutex and will continue waiting until a task is interrupted. Well how do I actually interrupt a task?
Suffix _interruptible
in Linux kernel means that waiting by the function will be interrupted if thread(process) receives the signal.
It can be signal sent by kill()
user-space function, or signals generated by specific functions when condition met, e.g. by the timer (create_timer()
when time is expired, or by asinchronous IO when pending operation has been completed.
Note, that uninterruptible wait cannot be interrupted even by SIGKILL, that is process cannot be finished until such wait ends.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With