From: Melkor Ainur <melkorainur@yahoo.com>
To: linux-kernel@vger.kernel.org
Subject: signal_pending() and schedule()
Date: Tue, 26 Mar 2002 16:19:55 -0800 (PST) [thread overview]
Message-ID: <20020327001955.99099.qmail@web21203.mail.yahoo.com> (raw)
[-- 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/
next reply other threads:[~2002-03-27 0:20 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-03-27 0:19 Melkor Ainur [this message]
2002-03-27 0:53 ` Alan Cox
2002-03-27 1:49 ` Joel Becker
2002-03-27 3:52 ` Melkor Ainur
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20020327001955.99099.qmail@web21203.mail.yahoo.com \
--to=melkorainur@yahoo.com \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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®