Changeset 111b9b9 in mainline for kernel/generic/src/synch/syswaitq.c


Ignore:
Timestamp:
2023-02-11T19:13:44Z (15 months ago)
Author:
Jiří Zárevúcky <zarevucky.jiri@…>
Branches:
master, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
4777e02
Parents:
76e17d7c
git-author:
Jiří Zárevúcky <zarevucky.jiri@…> (2022-08-15 17:46:39)
git-committer:
Jiří Zárevúcky <zarevucky.jiri@…> (2023-02-11 19:13:44)
Message:

Reimplement waitq using thread_wait/wakeup

This adds a few functions to the thread API which can be
summarized as "stop running until woken up by others".
The ordering and context-switching concerns are thus yeeted
to this abstraction and waitq only deals with maintaining
the queues. Overall, this makes the control flow in waitq
much easier to navigate.

File:
1 edited

Legend:

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

    r76e17d7c r111b9b9  
    159159#endif
    160160
    161         errno_t rc = waitq_sleep_timeout(kobj->waitq, timeout,
    162             SYNCH_FLAGS_INTERRUPTIBLE | flags, NULL);
     161        errno_t rc = _waitq_sleep_timeout(kobj->waitq, timeout,
     162            SYNCH_FLAGS_INTERRUPTIBLE | flags);
    163163
    164164#ifdef CONFIG_UDEBUG
     
    183183                return (sys_errno_t) ENOENT;
    184184
    185         waitq_wakeup(kobj->waitq, WAKEUP_FIRST);
     185        waitq_wake_one(kobj->waitq);
    186186
    187187        kobject_put(kobj);
Note: See TracChangeset for help on using the changeset viewer.