All of lore.kernel.org
 help / color / mirror / Atom feed
* [KJ] Re: [PATCH] drivers/cdrom/mcdx.c: replace
@ 2005-10-26 19:18 Alexey Dobriyan
  2005-10-26 19:48 ` Nishanth Aravamudan
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: Alexey Dobriyan @ 2005-10-26 19:18 UTC (permalink / raw)
  To: kernel-janitors

[-- Attachment #1: Type: text/plain, Size: 1059 bytes --]

On Sat, Oct 22, 2005 at 09:59:18PM -0500, irwan.djajadi@iname.com wrote:
> drivers/cdrom/mcdx.c: replace interruptible_sleep_on() with
> wait_event_interruptible() and schedule_timeout_interruptible(). Removed
> sleepq wait_queue, since it's no longer needed. Reordered some conditional
> prints because wait_event_interruptible_timeout() returns -ERESTARTSYS when
> interrupted by a signal.

> --- 2.6.14-rc5/drivers/cdrom/mcdx.c
> +++ mod/drivers/cdrom/mcdx.c
> @@ -909,7 +908,7 @@ static int mcdx_talk(struct s_drive_stuf
>
>  	while (stuffp->lock) {
>  		xtrace(SLEEP, "*** talk: lockq\n");
> -		interruptible_sleep_on(&stuffp->lockq);
> +		wait_event_interruptible(stuffp->lockq, !stuffp->lock);
>  		xtrace(SLEEP, "talk: awoken\n");
>  	}

> @@ -1335,7 +1333,7 @@ static int mcdx_xfer(struct s_drive_stuf
>  	}
>  
>  	while (stuffp->lock) {
> -		interruptible_sleep_on(&stuffp->lockq);
> +		wait_event_interruptible(stuffp->lockq, !stuffp->lock);
>  	}

Looks like the whole loops should be replaced.
wait_event_interruptible() does it's own looping.


[-- Attachment #2: Type: text/plain, Size: 168 bytes --]

_______________________________________________
Kernel-janitors mailing list
Kernel-janitors@lists.osdl.org
https://lists.osdl.org/mailman/listinfo/kernel-janitors

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

end of thread, other threads:[~2005-10-28  3:53 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-10-26 19:18 [KJ] Re: [PATCH] drivers/cdrom/mcdx.c: replace Alexey Dobriyan
2005-10-26 19:48 ` Nishanth Aravamudan
2005-10-27  3:56 ` irwan.djajadi
2005-10-27 19:11 ` Nishanth Aravamudan
2005-10-28  3:53 ` Irwan Djajadi

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.