All of lore.kernel.org
 help / color / mirror / Atom feed
* [KJ] Re: block/pktcdvd: set_current_state() location
@ 2004-10-22 21:55 Peter Osterlund
  2004-10-22 22:07 ` Nishanth Aravamudan
  0 siblings, 1 reply; 2+ messages in thread
From: Peter Osterlund @ 2004-10-22 21:55 UTC (permalink / raw)
  To: kernel-janitors

[-- Attachment #1: Type: TEXT/PLAIN, Size: 772 bytes --]

On Fri, 22 Oct 2004, Nishanth Aravamudan wrote:

> Jens & Peter,
>
> I was looking through 2.6.9-bk7 with the latest kjt (Kernel-Janitors
> patchset) applied and noticed a new schedule_timeout() in the code. In
> drivers/block/pktcdvd.c::kcdrwd(), the state is set at the head of the
> for(;;)-loop, while the sleeping doesn't occur until nearly the end of
> the same loop. Is there a reason for the code in-between to run in
> TASK_INTERRUPTIBLE?

Yes, it's needed to avoid race conditions. The code avoids race conditions
in the same way that __wait_event_timeout() does, but the "condition" is
much more complicated, so it wouldn't make sense to use the
__wait_event_timeout() macro directly.

-- 
Peter Osterlund - petero2@telia.com
http://w1.894.telia.com/~u89404340

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

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

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

end of thread, other threads:[~2004-10-22 22:07 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-10-22 21:55 [KJ] Re: block/pktcdvd: set_current_state() location Peter Osterlund
2004-10-22 22:07 ` Nishanth Aravamudan

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.