Changes in kernel/generic/src/synch/waitq.c [b59318e:7c3fb9b] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/generic/src/synch/waitq.c
rb59318e r7c3fb9b 57 57 #include <adt/list.h> 58 58 #include <arch/cycle.h> 59 #include <mem.h>60 59 61 60 static void waitq_sleep_timed_out(void *); … … 72 71 void waitq_initialize(waitq_t *wq) 73 72 { 74 memsetb(wq, sizeof(*wq), 0);75 73 irq_spinlock_initialize(&wq->lock, "wq.lock"); 76 74 list_initialize(&wq->sleepers); 75 wq->missed_wakeups = 0; 77 76 } 78 77 … … 115 114 thread->saved_context = thread->sleep_timeout_context; 116 115 do_wakeup = true; 117 if (thread->sleep_composable)118 wq->ignore_wakeups++;119 116 thread->sleep_queue = NULL; 120 117 irq_spinlock_unlock(&wq->lock, false); … … 179 176 list_remove(&thread->wq_link); 180 177 thread->saved_context = thread->sleep_interruption_context; 181 if (thread->sleep_composable)182 wq->ignore_wakeups++;183 178 do_wakeup = true; 184 179 thread->sleep_queue = NULL; … … 398 393 */ 399 394 irq_spinlock_lock(&THREAD->lock, false); 400 401 THREAD->sleep_composable = (flags & SYNCH_FLAGS_FUTEX);402 395 403 396 if (flags & SYNCH_FLAGS_INTERRUPTIBLE) { … … 545 538 assert(irq_spinlock_locked(&wq->lock)); 546 539 547 if (wq->ignore_wakeups > 0) {548 if (mode == WAKEUP_FIRST) {549 wq->ignore_wakeups--;550 return;551 }552 wq->ignore_wakeups = 0;553 }554 555 540 loop: 556 541 if (list_empty(&wq->sleepers)) {
Note:
See TracChangeset
for help on using the changeset viewer.