Question: why do you have your own versions of the wait_event() macros? (From <linux/sched.h> on 2.4, or <linux/wait.h> on 2.6 kernels.)
The macros are slighty different from linux/sched.h (that is where I got them initially). ..
This is a standard "condition variable" kind of synchronization that is described in OS text books (sorry I don't have a reference handy).
Ah, yes. I remember being surprised that the Linux synchronization work didn't have such a notion. I know that Solaris spent a lot of time making those behave right -- they're less error-prone than most of the alternatives, in the hands of users with "typical skills". Usually the only error folk made was using the wrong lock for a CV.
You need this construct to avoid race conditions where the condition could change during or after the test. For example
...
I would like to add these macros to the kernel--I use them or something similar frequently. I was going to post to lkml about it. What do you think?
See above ... :)
I haven't looked at those specific issues in detail for quite a long time, but perhaps they partly explain why those macros aren't as widely used as I might expect. (That, and the fact that they expand to rather a lot of in-line code.)
Yes, please make it part of your trees. I will try to
integrate it into the 2.4 tree and send you a patch as
soon as I can.
OK, I'll wait for you to send me a patch against my gadget-2.4 tree (the one that couldn't be cloned recently due to that issue with BKD on kernel.bkbits.net), and I'll merge that.
With Greg looking at 2.6, that seems like a good sharing-out of work for the moment ... :)
- Dave
------------------------------------------------------- This sf.net email is sponsored by:ThinkGeek Welcome to geek heaven. http://thinkgeek.com/sf _______________________________________________ [EMAIL PROTECTED] To unsubscribe, use the last form field at: https://lists.sourceforge.net/lists/listinfo/linux-usb-devel
