how can we wake up some process which is scheduled?
Alexandru Juncu
alex.juncu at rosedu.org
Tue Dec 13 03:54:13 EST 2011
On Tue, Dec 13, 2011 at 10:44 AM, loody <miloody at gmail.com> wrote:
> hi all:
> There is a kernel API, "schedule_timeout_interruptible".
> since it has the name interruptible, who and how can we interrupt this task?
> suppose A use schedule_timeout_interruptible for 20s period and B
> found something and he want to wake up A within this 20s period.
I think it's related to hardware interrupts, not other tasks. So a
process waiting for a timer can be interrupted by a signal (there's a
switch between process context and interrupt context).
Take a look at schedule_timeout help page [0]. Notice the
TASK_UNINTERRUPTIBLE and TASK_INTERRUPTIBLE sections.
[0] http://kernel.org/doc/htmldocs/device-drivers/API-schedule-timeout.html
--
Alexandru Juncu
ROSEdu
http://rosedu.org
More information about the Kernelnewbies
mailing list