Changeset 5663872 in mainline for kernel/generic/include/proc/thread.h


Ignore:
Timestamp:
2024-01-14T18:24:05Z (17 months ago)
Author:
Jiří Zárevúcky <zarevucky.jiri@…>
Branches:
master
Children:
23f36a3
Parents:
4760793
git-author:
Jiří Zárevúcky <zarevucky.jiri@…> (2023-02-18 13:37:30)
git-committer:
Jiří Zárevúcky <zarevucky.jiri@…> (2024-01-14 18:24:05)
Message:

Move stuff around for thread sleep

Only mark the thread as ready for wakeup after we switch to
another context. This way, soundness of the sychronization
does not depend on thread lock being held across the context
switch, which gives us more freedom.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • kernel/generic/include/proc/thread.h

    r4760793 r5663872  
    190190extern void thread_interrupt(thread_t *);
    191191
     192enum sleep_state {
     193        SLEEP_INITIAL,
     194        SLEEP_ASLEEP,
     195        SLEEP_WOKE,
     196};
     197
    192198typedef enum {
    193199        THREAD_OK,
Note: See TracChangeset for help on using the changeset viewer.