signal_pending() and schedule()

Melkor Ainur (melkorainur@yahoo.com)
Tue, 26 Mar 2002 16:19:55 -0800 (PST)


Hello all,

I have been writing a hw driver for SAN. In my
implementation of tcp_sendmsg, I attempt to force
the application to sleep until the data buffer has
been dma-ed:

if (signal_pending(current)) {
return -ERESTARTSYS;
}
// no signal was pending

// timeo == MAX_SCHEDULE_TIMEOUT in this case
timeo = schedule_timeout(timeo);
// signal is always pending
if (signal_pending(current)) {
return -ERESTARTSYS;
}
This works fine for some applications like netcat,etc
but fails for netscape. In debugging this, I observe
that after calling schedule_timeout(), the sigpending
bit appears to be set immediately and thus
schedule() doesn't actually put the process to sleep.
I will continue to look for where schedule_timeout()
or schedule() could affect sigpending. In the mean
time, I am hoping for any hints/suggestions that could
help me solve this issue of why schedule_timeout
appears to affect sigpending. (2.4.7-10smp on x86)

Thanks,
Melkor

__________________________________________________
Do You Yahoo!?
Yahoo! Movies - coverage of the 74th Academy Awards®
http://movies.yahoo.com/
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/