From: domen@coderock.org
To: akpm@osdl.org
Cc: linux-kernel@vger.kernel.org, domen@coderock.org, nacc@us.ibm.com
Subject: [patch 01/14] char/snsc: reorder set_current_state() and add_wait_queue()
Date: Sun, 06 Mar 2005 23:36:16 +0100 [thread overview]
Message-ID: <20050306223616.C82751EC90@trashy.coderock.org> (raw)
Any comments would be, as always, appreciated.
-Nish
Reorder add_wait_queue() and set_current_state() as a
signal could be lost in between the two functions.
Signed-off-by: Nishanth Aravamudan <nacc@us.ibm.com>
Signed-off-by: Domen Puncer <domen@coderock.org>
---
kj-domen/drivers/char/snsc.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff -puN drivers/char/snsc.c~reorder-state-drivers_char_snsc drivers/char/snsc.c
--- kj/drivers/char/snsc.c~reorder-state-drivers_char_snsc 2005-03-05 16:09:54.000000000 +0100
+++ kj-domen/drivers/char/snsc.c 2005-03-05 16:09:54.000000000 +0100
@@ -192,8 +192,8 @@ scdrv_read(struct file *file, char __use
}
len = CHUNKSIZE;
- add_wait_queue(&sd->sd_rq, &wait);
set_current_state(TASK_INTERRUPTIBLE);
+ add_wait_queue(&sd->sd_rq, &wait);
spin_unlock_irqrestore(&sd->sd_rlock, flags);
schedule_timeout(SCDRV_TIMEOUT);
@@ -288,8 +288,8 @@ scdrv_write(struct file *file, const cha
return -EAGAIN;
}
- add_wait_queue(&sd->sd_wq, &wait);
set_current_state(TASK_INTERRUPTIBLE);
+ add_wait_queue(&sd->sd_wq, &wait);
spin_unlock_irqrestore(&sd->sd_wlock, flags);
schedule_timeout(SCDRV_TIMEOUT);
_
next reply other threads:[~2005-03-06 23:29 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-03-06 22:36 domen [this message]
2005-03-14 17:45 ` [patch 01/14] char/snsc: reorder set_current_state() and add_wait_queue() Jesse Barnes
2005-03-14 17:54 ` Nishanth Aravamudan
2005-03-14 18:03 ` Jesse Barnes
2005-03-14 18:41 ` Greg Howard
2005-03-14 18:35 ` Greg Howard
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=20050306223616.C82751EC90@trashy.coderock.org \
--to=domen@coderock.org \
--cc=akpm@osdl.org \
--cc=linux-kernel@vger.kernel.org \
--cc=nacc@us.ibm.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.