Changeset 111b9b9 in mainline for kernel/generic/include/synch/waitq.h
- Timestamp:
- 2023-02-11T19:13:44Z (20 months ago)
- 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)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/generic/include/synch/waitq.h
r76e17d7c r111b9b9 41 41 #include <adt/list.h> 42 42 43 typedef enum {44 WAKEUP_FIRST = 0,45 WAKEUP_ALL,46 WAKEUP_CLOSE,47 } wakeup_mode_t;48 49 43 /** Wait queue structure. 50 44 * … … 58 52 59 53 /** 60 * Number of waitq_wakeup() calls that didn't find a thread to wake up.61 * 54 * If negative, number of wakeups that are to be ignored (necessary for futex operation). 55 * If positive, number of wakeups that weren't able to wake a thread. 62 56 */ 63 int missed_wakeups; 64 65 /** Number of wakeups that need to be ignored due to futex timeout. */ 66 int ignore_wakeups; 57 int wakeup_balance; 67 58 68 59 /** List of sleeping threads for which there was no missed_wakeup. */ 69 60 list_t sleepers; 61 62 bool closed; 70 63 } waitq_t; 64 65 typedef struct wait_guard { 66 ipl_t ipl; 67 } wait_guard_t; 71 68 72 69 struct thread; … … 75 72 extern void waitq_initialize_with_count(waitq_t *, int); 76 73 extern errno_t waitq_sleep(waitq_t *); 77 extern errno_t waitq_sleep_timeout(waitq_t *, uint32_t, unsigned int, bool *); 78 extern ipl_t waitq_sleep_prepare(waitq_t *); 79 extern errno_t waitq_sleep_unsafe(waitq_t *, bool *); 80 extern errno_t waitq_sleep_timeout_unsafe(waitq_t *, uint32_t, unsigned int, bool *); 81 extern void waitq_sleep_finish(waitq_t *, bool, ipl_t); 82 extern void waitq_wakeup(waitq_t *, wakeup_mode_t); 83 extern void _waitq_wakeup_unsafe(waitq_t *, wakeup_mode_t); 84 extern void waitq_interrupt_sleep(struct thread *); 74 extern errno_t _waitq_sleep_timeout(waitq_t *, uint32_t, unsigned int); 75 extern errno_t waitq_sleep_timeout(waitq_t *, uint32_t); 76 extern wait_guard_t waitq_sleep_prepare(waitq_t *); 77 extern errno_t waitq_sleep_unsafe(waitq_t *, wait_guard_t); 78 extern errno_t waitq_sleep_timeout_unsafe(waitq_t *, uint32_t, unsigned int, wait_guard_t); 79 80 extern void waitq_wake_one(waitq_t *); 81 extern void waitq_wake_all(waitq_t *); 82 extern void waitq_signal(waitq_t *); 83 extern void waitq_close(waitq_t *); 85 84 86 85 #endif
Note:
See TracChangeset
for help on using the changeset viewer.