On 14 Mar 2005 13:06:37 -0000, jhoney jhoney <jhoney_joney@xxxxxxxxxxxxxx> wrote: > I have one doubt. How the process is blocking on a system call. For AFAIK, sleeping is mor or less done in the following way: 1. The process adds itself to a work queue (wake_queue_head_t) that will wake it up later on. 2. process calls set_current_state(TASK_INTERRUPTIBLE) (or TASK_UNINTERRUPTIBLE if signals are not allowed to wake it up) 3. calls schedule() - this is where sleeping occurs 4. set_current_state(TASK_RUNNING) - this gets executed once the process is waken up and scheduled. And that's it. BTW, this is IMHO a very basic question. Consider buying a book on kernel programing. I'm currenty reading Linux Kernel Development (2nd edition) by Robert Love and so far it seems to be up-to date (covers kernels 2.6.x), well written and indeed very good. HTH Martin -- Kernelnewbies: Help each other learn about the Linux kernel. Archive: http://mail.nl.linux.org/kernelnewbies/ FAQ: http://kernelnewbies.org/faq/