Changeset 5c8ba05 in mainline for kernel/generic/src/ipc/ipc.c


Ignore:
Timestamp:
2007-05-07T18:52:24Z (18 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
6fa4888b
Parents:
4f42d52
Message:

Cleanup the waitq_wakeup() interface.
Replace numeric constants (i.e. 0)
and boolean constants (i.e. false) with
more readable WAKEUP_FIRST. Also change the
type of the second argument of waitq_wakeup()
to a newly introduced type wakeup_mode_t.

Fix behaviour of waitq_wakeup() in case
that WAKEUP_ALL semantics is required
but no threads are sleeping in the wait
queue. This is a similar fix to that of
Jan Hudecek committed in the RCU branch,
but, IMHO, is more straightforward and
also doesn't eat up previous missed
wakeups.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • kernel/generic/src/ipc/ipc.c

    r4f42d52 r5c8ba05  
    164164        list_append(&call->link, &callerbox->answers);
    165165        spinlock_unlock(&callerbox->lock);
    166         waitq_wakeup(&callerbox->wq, 0);
     166        waitq_wakeup(&callerbox->wq, WAKEUP_FIRST);
    167167}
    168168
     
    206206        list_append(&call->link, &box->calls);
    207207        spinlock_unlock(&box->lock);
    208         waitq_wakeup(&box->wq, 0);
     208        waitq_wakeup(&box->wq, WAKEUP_FIRST);
    209209}
    210210
Note: See TracChangeset for help on using the changeset viewer.