From: John Levon <levon@movementarian.org>
To: torvalds@transmeta.com, linux-kernel@vger.kernel.org
Subject: [PATCH 4/8] OProfile update
Date: Sun, 4 May 2003 00:44:06 +0100 [thread overview]
Message-ID: <10520054463981@movementarian.org> (raw)
In-Reply-To: <10520054461823@movementarian.org>
If there's are multiple tasks sleeping inside the read routine ever, this is necessary.
diff -Naur -X dontdiff linux-cvs/drivers/oprofile/event_buffer.c linux-me/drivers/oprofile/event_buffer.c
--- linux-cvs/drivers/oprofile/event_buffer.c 2002-12-21 19:18:20.000000000 +0000
+++ linux-me/drivers/oprofile/event_buffer.c 2003-04-29 01:09:35.000000000 +0100
@@ -151,11 +151,15 @@
if (count != max || *offset)
return -EINVAL;
- /* wait for the event buffer to fill up with some data */
wait_event_interruptible(buffer_wait, atomic_read(&buffer_ready));
+
if (signal_pending(current))
return -EINTR;
+ /* can't currently happen */
+ if (!atomic_read(&buffer_ready))
+ return -EAGAIN;
+
down(&buffer_sem);
atomic_set(&buffer_ready, 0);
next prev parent reply other threads:[~2003-05-03 23:33 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-05-03 23:44 [PATCH 1/8] OProfile update John Levon
2003-05-03 23:44 ` [PATCH 2/8] " John Levon
2003-05-03 23:44 ` [PATCH 3/8] " John Levon
2003-05-03 23:44 ` John Levon [this message]
2003-05-03 23:44 ` [PATCH 5/8] " John Levon
2003-05-03 23:44 ` [PATCH 6/8] " John Levon
2003-05-03 23:44 ` [PATCH 7/8] " John Levon
2003-05-03 23:44 ` [PATCH 8/8] " John Levon
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=10520054463981@movementarian.org \
--to=levon@movementarian.org \
--cc=linux-kernel@vger.kernel.org \
--cc=torvalds@transmeta.com \
/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