0

If I have 3 pthreads: A, B, C, all originating from the same process, running in user space and one thread, thread B does a blocking read from a kernel module and is put to sleep, will threads A and C also be put to sleep as a result?

According to the documentation, wait_event_interruptible puts the calling process to sleep, not thread.

0

After testing personally, it appears only the calling thread is put to sleep, not any other threads. While one thread was waiting during a blocked read, the other threads were still active.

| improve this answer | |
  • In Linux, threads are implemented as very light weight processes, so the documentation is technically correct. – Murray Jensen Nov 23 '19 at 1:22

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.