Re: [RFC PATCH 2.6.17-mm1 4/3] ieee1394: convert ieee1394_transactions from semaphores to waitqueue

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



I wrote on 2006-06-24:
+	return wait_event_interruptible(tlabel_wq,
+					!hpsb_get_tlabel_atomic(packet));
Hmm. "Linux Device Drivers" says about wait_event_interruptible(wq,
condition): ''Note that @condition may be evaluated an arbitrary number
of times, so it should not have any side effects.''
Alas the hpsb_get_tlabel_atomic() _does_ have a side effect, but only
when !hpsb_get_tlabel_atomic(packet) is true.
The current implementation of wait_event_interruptible() seems to
evaluate @condition multiple times if it is false but only _once_ while
it is true. May I rely on this fact or do I have to rewrite the
condition to be completely free of side effects?
I don't believe there would be ever a sensible implementation of
wait_event_interruptible() which would evaluate @condition again after
it became true.
Thanks,
--
Stefan Richter
-=====-=-==- -==- ==--=
http://arcgraph.de/sr/
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux