Changes in kernel/generic/src/synch/waitq.c [55b77d9:df58e44] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/generic/src/synch/waitq.c
r55b77d9 rdf58e44 69 69 { 70 70 irq_spinlock_initialize(&wq->lock, "wq.lock"); 71 list_initialize(&wq-> sleepers);71 list_initialize(&wq->head); 72 72 wq->missed_wakeups = 0; 73 73 } … … 196 196 irq_spinlock_lock(&wq->lock, true); 197 197 198 if (!list_empty(&wq->sleepers)) { 199 thread_t *thread = list_get_instance(list_first(&wq->sleepers), 200 thread_t, wq_link); 198 if (!list_empty(&wq->head)) { 199 thread_t *thread = list_get_instance(wq->head.next, thread_t, wq_link); 201 200 202 201 irq_spinlock_lock(&thread->lock, false); … … 408 407 } 409 408 410 list_append(&THREAD->wq_link, &wq-> sleepers);409 list_append(&THREAD->wq_link, &wq->head); 411 410 412 411 /* … … 465 464 466 465 loop: 467 if (list_empty(&wq-> sleepers)) {466 if (list_empty(&wq->head)) { 468 467 wq->missed_wakeups++; 469 468 if ((count) && (mode == WAKEUP_ALL)) … … 474 473 475 474 count++; 476 thread_t *thread = list_get_instance(list_first(&wq->sleepers), 477 thread_t, wq_link); 475 thread_t *thread = list_get_instance(wq->head.next, thread_t, wq_link); 478 476 479 477 /*
Note:
See TracChangeset
for help on using the changeset viewer.