[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

System calls and preemption




I need to make the following changes to write system call...

sys_write()
{
  if (some condition)
       reschedule the process (preempt)
  else
       whatever write does
}

The problem is how do I reschedule the process ? By the time I know that any process issued a write(), I'm switched to kernel mode! Do I need to decrement the instruction pointer (eip register on x86) and reschedule it ? Or is there some better way to do the same ? 

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/