I want to do the following changes to write() system call... sys_write() { if (some_condition) reschedule the process at a later time (preempt) else do whatever write does } The problem is when I'm checking the condition, I'm in kernel mode, so how do I preempt the process that called write. Also, how do I access the instruction pointer (eip for x86) so that I decrement it to what it was before calling write ? I am trying to decrement the eip because, when the process is rescheduled it should issue write again (and not the "next" instruction). Is there some other/better way of handling this ? TIA, -siddharth -- Get your free email from www.linuxmail.org Powered by Outblaze -- Kernelnewbies: Help each other learn about the Linux kernel. Archive: http://mail.nl.linux.org/kernelnewbies/ FAQ: http://kernelnewbies.org/faq/