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.

1 Answer 1

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.

1
  • In Linux, threads are implemented as very light weight processes, so the documentation is technically correct. Commented Nov 23, 2019 at 1:22

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .