[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-devel] [PATCH] [Mini-OS] Make wake_up callback-safe
As it may compete with event handlers waking wait queues, wake_up needs to be callback-safe. Signed-off-by: Samuel Thibault <samuel.thibault@xxxxxxxxxx> diff -r f2711b7eae95 -r 36bf1e737b87 extras/mini-os/include/wait.h --- a/extras/mini-os/include/wait.h Thu Nov 22 19:55:42 2007 +0000 +++ b/extras/mini-os/include/wait.h Fri Nov 23 13:21:02 2007 +0000 @@ -57,13 +57,16 @@ static inline void wake_up(struct wait_queue_head *head) { + unsigned long flags; struct list_head *tmp, *next; + local_irq_save(flags); list_for_each_safe(tmp, next, &head->thread_list) { struct wait_queue *curr; curr = list_entry(tmp, struct wait_queue, thread_list); wake(curr->thread); } + local_irq_restore(flags); } #define add_waiter(w, wq) do { \ _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxxxxxxxx http://lists.xensource.com/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |