线程在等待互斥量时是否可以在逻辑上中断?

Can a thread be logically interruptible while waiting for a mutex?

我在看R&R的Unix系统编程,遇到一个关于mutex的问题。对于那本书中所述的以下段落。当他说等待互斥量的线程在逻辑上不可中断时,是否意味着当线程等待互斥量时,它将无法进行上下文切换?有人可以详细说明吗?

A thread that waits for a mutex is not logically interruptible except by termination of the process, termination of a thread with pthread_exit (from a signal handler), or asynchronous cancellation (which is normally not used).

不,这并不意味着它不能上下文切换。相反,等待已获取互斥锁的线程几乎总是 上下文切换,也许在短暂的延迟之后。

这意味着 pthread_mutex_lock() 调用不会 return EINTR 或类似的调用 - 它要么成功获取互斥锁,要么 return 持续失败。