mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* signal_pending() and schedule()
@ 2002-03-27  0:19 Melkor Ainur
  2002-03-27  0:53 ` Alan Cox
  2002-03-27  1:49 ` Joel Becker
  0 siblings, 2 replies; 4+ messages in thread
From: Melkor Ainur @ 2002-03-27  0:19 UTC (permalink / raw)
  To: linux-kernel

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain; charset=us-ascii, Size: 1204 bytes --]

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/

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2002-03-27  3:52 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-03-27  0:19 signal_pending() and schedule() Melkor Ainur
2002-03-27  0:53 ` Alan Cox
2002-03-27  1:49 ` Joel Becker
2002-03-27  3:52   ` Melkor Ainur

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

all inboxes | Powered by JetHome®