Changeset 5c8ba05 in mainline for kernel/generic/src/proc/scheduler.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/proc/scheduler.c

    r4f42d52 r5c8ba05  
    412412                                        goto repeat;
    413413                                }
    414                                 _waitq_wakeup_unsafe(&THREAD->join_wq, false);
     414                                _waitq_wakeup_unsafe(&THREAD->join_wq,
     415                                    WAKEUP_FIRST);
    415416                                spinlock_unlock(&THREAD->join_wq.lock);
    416417                               
Note: See TracChangeset for help on using the changeset viewer.