Messages in this thread | | | Date | Mon, 17 May 1999 18:11:43 -0400 (edt) | From | Sam Roberts <> | Subject | why would sleep not sleep...???? |
| |
NOTE: suggestions as to how to approach debugging this would be (almost) as valuable as an explanation! I'm at my wits end.
I am seeing a sleep call return for unknown reasons....!
As I understand it, a call to interruptible_sleep_on(&wq) should sleep until either a call to wake_up_interruptible(&wg) *OR* an unmasked signal is delivered.
This is with Linux 2.0.35, doesn't seem to happen with 2.2, but that is *not* comforting.
All my calls to sleep_on()/wake_up() are made through these functions, the task structure has information about the open connections to my module, and the kprint(debug..)s are conditionally compiled in for debugging. Since I can see every wake or sleep in the debug log, I'm convince I'm not "accidently" waking my blocked processes up, and there are never any pending signals, blocked or unblocked. Still, I'm waking up.
Q1) can wake_up() cause scheduling? It would appear not, from the sources.
Q2) Are there any other known causes of waking up?
/* * Task wake and sleep wrappers. */
void SrrTaskWake(SrrTask* task, int state) { // kprintf(debug ....)
task->state = state; task->waker = current->pid;
wake_up_interruptible(&task->wq); }
void SrrTaskSleep(SrrTask* task, int state) { // kprintf(debug ....)
task->state = state; task->waker = 0;
if(task->pid != current->pid) { Oops("current %d trying to sleep on task %d!\n", current->pid, task->pid); return; }
interruptible_sleep_on(&task->wq);
if(!task->waker && !signal_pending(current)) { // --------- PROBLEM ------------ // WHAT THE **** HAPPENED HERE??!!! //printk(bad bad bad return; } // kprintf(debug ....) }
-- Sam Roberts (sam@cogent.ca), Cogent Real-Time Systems (www.cogent.ca) "News is very popular among its readers." - RFC 977 (NNTP)
- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/
| |