Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • kernel/generic/src/synch/waitq.c

    r55b77d9 rdf58e44  
    6969{
    7070        irq_spinlock_initialize(&wq->lock, "wq.lock");
    71         list_initialize(&wq->sleepers);
     71        list_initialize(&wq->head);
    7272        wq->missed_wakeups = 0;
    7373}
     
    196196        irq_spinlock_lock(&wq->lock, true);
    197197       
    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);
    201200               
    202201                irq_spinlock_lock(&thread->lock, false);
     
    408407        }
    409408       
    410         list_append(&THREAD->wq_link, &wq->sleepers);
     409        list_append(&THREAD->wq_link, &wq->head);
    411410       
    412411        /*
     
    465464       
    466465loop:
    467         if (list_empty(&wq->sleepers)) {
     466        if (list_empty(&wq->head)) {
    468467                wq->missed_wakeups++;
    469468                if ((count) && (mode == WAKEUP_ALL))
     
    474473       
    475474        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);
    478476       
    479477        /*
Note: See TracChangeset for help on using the changeset viewer.