Changeset b0f00a9 in mainline for kernel/generic/src/synch/waitq.c
- Timestamp:
- 2011-11-06T22:21:05Z (14 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 898e847
- Parents:
- 2bdf8313 (diff), 7b5f4c9 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)links above to see all the changes relative to each parent. - File:
-
- 1 edited
-
kernel/generic/src/synch/waitq.c (modified) (6 diffs)
Legend:
- Unmodified
- Added
- Removed
-
kernel/generic/src/synch/waitq.c
r2bdf8313 rb0f00a9 45 45 46 46 #include <synch/waitq.h> 47 #include <synch/synch.h>48 47 #include <synch/spinlock.h> 49 48 #include <proc/thread.h> … … 69 68 { 70 69 irq_spinlock_initialize(&wq->lock, "wq.lock"); 71 list_initialize(&wq-> head);70 list_initialize(&wq->sleepers); 72 71 wq->missed_wakeups = 0; 73 72 } … … 196 195 irq_spinlock_lock(&wq->lock, true); 197 196 198 if (!list_empty(&wq->head)) { 199 thread_t *thread = list_get_instance(wq->head.next, thread_t, wq_link); 197 if (!list_empty(&wq->sleepers)) { 198 thread_t *thread = list_get_instance(list_first(&wq->sleepers), 199 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-> head);409 list_append(&THREAD->wq_link, &wq->sleepers); 410 410 411 411 /* … … 464 464 465 465 loop: 466 if (list_empty(&wq-> head)) {466 if (list_empty(&wq->sleepers)) { 467 467 wq->missed_wakeups++; 468 468 if ((count) && (mode == WAKEUP_ALL)) … … 473 473 474 474 count++; 475 thread_t *thread = list_get_instance(wq->head.next, thread_t, wq_link); 475 thread_t *thread = list_get_instance(list_first(&wq->sleepers), 476 thread_t, wq_link); 476 477 477 478 /*
Note:
See TracChangeset
for help on using the changeset viewer.
