public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* wake_up and wait_event
@ 2000-12-13  4:52 Sourav Ghosh
  0 siblings, 0 replies; only message in thread
From: Sourav Ghosh @ 2000-12-13  4:52 UTC (permalink / raw)
  To: linux-kernel

Hi,
I have two questions:

1. Is it ok to make a "wake_up_process()" call from an interrupt
handler?

In my work, there is a kernel thread that sleeps under "sleep_on()" and
wakes up by the "wake_up_process()" by an interrupt handler.

My system is crashing and I just wanna make sure if this is not a
problem..

2. For the macros  __wait_event() and __wait_event_interruptible(), it
seems to me that they can't be called from a kernel thread as they set
the task "current" as "TASK_UNINTERRUPTIBLE" due to which it gets
removed from the scheduler runqueue. So the scheduler never chooses that
task again even if the task gets set as "TASK_RUNNING" at the end of the
macro.

Is that correct? If so, how is it possible to add the task to the
runqueue again (other than defining another new macro or function) ?

Thanks,

--
Sourav



-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2000-12-13  5:24 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2000-12-13  4:52 wake_up and wait_event Sourav Ghosh

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox