Changeset 55b77d9 in mainline for kernel/generic/src/synch
- Timestamp:
- 2011-06-17T20:39:16Z (15 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 8f164724
- Parents:
- 98caf49
- Location:
- kernel/generic/src/synch
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/generic/src/synch/futex.c
r98caf49 r55b77d9 272 272 void futex_cleanup(void) 273 273 { 274 link_t *cur;275 276 274 mutex_lock(&futex_ht_lock); 277 275 mutex_lock(&TASK->futexes_lock); 278 276 279 for (cur = TASK->futexes.leaf_head.next; 280 cur != &TASK->futexes.leaf_head; cur = cur->next) { 277 list_foreach(TASK->futexes.leaf_list, cur) { 281 278 btree_node_t *node; 282 279 unsigned int i; -
kernel/generic/src/synch/waitq.c
r98caf49 r55b77d9 69 69 { 70 70 irq_spinlock_initialize(&wq->lock, "wq.lock"); 71 list_initialize(&wq-> head);71 list_initialize(&wq->sleepers); 72 72 wq->missed_wakeups = 0; 73 73 } … … 196 196 irq_spinlock_lock(&wq->lock, true); 197 197 198 if (!list_empty(&wq->head)) { 199 thread_t *thread = list_get_instance(wq->head.next, thread_t, wq_link); 198 if (!list_empty(&wq->sleepers)) { 199 thread_t *thread = list_get_instance(list_first(&wq->sleepers), 200 thread_t, wq_link); 200 201 201 202 irq_spinlock_lock(&thread->lock, false); … … 407 408 } 408 409 409 list_append(&THREAD->wq_link, &wq-> head);410 list_append(&THREAD->wq_link, &wq->sleepers); 410 411 411 412 /* … … 464 465 465 466 loop: 466 if (list_empty(&wq-> head)) {467 if (list_empty(&wq->sleepers)) { 467 468 wq->missed_wakeups++; 468 469 if ((count) && (mode == WAKEUP_ALL)) … … 473 474 474 475 count++; 475 thread_t *thread = list_get_instance(wq->head.next, thread_t, wq_link); 476 thread_t *thread = list_get_instance(list_first(&wq->sleepers), 477 thread_t, wq_link); 476 478 477 479 /*
Note:
See TracChangeset
for help on using the changeset viewer.
