lkml.org 
[lkml]   [2005]   [Mar]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [patch 01/14] char/snsc: reorder set_current_state() and add_wait_queue()
Date
On Sunday, March 6, 2005 2:36 pm, domen@coderock.org wrote:
> Any comments would be, as always, appreciated.

I don't have a problem with this change, but the maintainer probably should
have been Cc'd. Greg, does this change look ok to you? Note that it's
already been committed to the upstream tree, so if it's a bad change we'll
need to have the cset excluded or something.

>
> -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);
> _
> -
> 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/
-
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/

\
 
 \ /
  Last update: 2005-03-22 14:11    [W:0.081 / U:0.068 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site