Messages in this thread | | | Date | Sat, 6 Mar 1999 16:42:34 +0100 (CET) | From | Andrea Arcangeli <> | Subject | Re: [patch] sleep_on() fixes, 2.2.3-1 |
| |
On Sat, 6 Mar 1999, Ingo Molnar wrote:
>+#define wait_event_cli(wq, condition) \ >+ wait_event(wq, \ >+ ({ \ >+ int __ret; \ >+ cli(); \ >+ __ret = condition; \ >+ sti(); \ ^^^^^ this should be a restore_flags() according to me, but looks like we need sti() to don't deadlock in the subtle write_lock-way you Ingo discovered. I think we could remove the _cli version of the wait_event macro, if somebody need some locking he can call wait_event in a custom way as you did in wait_event_cli() itself.
>+#define __wait_event_interruptible(wq, condition) \
Here I think we could add a third param to the macro, that will be the retval in the interrupted case. It's zero cost and looks nicer to me.
Andrea Arcangeli
- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/
| |