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