Changeset 1871118 in mainline for kernel/generic/src/synch/waitq.c


Ignore:
Timestamp:
2023-02-10T22:59:11Z (2 years ago)
Author:
Jiří Zárevúcky <zarevucky.jiri@…>
Branches:
master, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
11d2c983
Parents:
daadfa6
git-author:
Jiří Zárevúcky <zarevucky.jiri@…> (2023-02-10 22:53:12)
git-committer:
Jiří Zárevúcky <zarevucky.jiri@…> (2023-02-10 22:59:11)
Message:

Make thread_t reference counted

This simplifies interaction between various locks and thread
lifespan, which simplifies things. For example, threads_lock can
now simply be a mutex protecting the global it was made for, and
nothing more.

File:
1 edited

Legend:

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

    rdaadfa6 r1871118  
    513513loop:
    514514        if (list_empty(&wq->sleepers)) {
    515                 if (mode != WAKEUP_ALL) {
     515                if (mode == WAKEUP_CLOSE) {
     516                        // FIXME: this can technically fail if we get two billion sleeps after the wakeup call.
     517                        wq->missed_wakeups = INT_MAX;
     518                } else if (mode != WAKEUP_ALL) {
    516519                        wq->missed_wakeups++;
    517520                }
Note: See TracChangeset for help on using the changeset viewer.