Changeset a55d76b1 in mainline for uspace/lib/c/include/fibril_synch.h
- Timestamp:
- 2018-06-13T17:07:58Z (6 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- be2a20ac, c407b98
- Parents:
- 899342e
- git-author:
- Jiří Zárevúcky <jiri.zarevucky@…> (2018-06-13 17:04:01)
- git-committer:
- Jiří Zárevúcky <jiri.zarevucky@…> (2018-06-13 17:07:58)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/c/include/fibril_synch.h
r899342e ra55d76b1 143 143 } fibril_timer_t; 144 144 145 /** A counting semaphore for fibrils. */ 146 typedef struct { 147 long count; 148 list_t waiters; 149 } fibril_semaphore_t; 150 151 #define FIBRIL_SEMAPHORE_INITIALIZER(name, cnt) \ 152 { \ 153 .count = (cnt), \ 154 .waiters = { \ 155 .head = { \ 156 .next = &(name).waiters.head, \ 157 .prev = &(name).waiters.head, \ 158 } \ 159 } \ 160 } 161 162 #define FIBRIL_SEMAPHORE_INITIALIZE(name, cnt) \ 163 fibril_semaphore_t name = FIBRIL_SEMAPHORE_INITIALIZER(name, cnt) 164 145 165 extern void fibril_mutex_initialize(fibril_mutex_t *); 146 166 extern void fibril_mutex_lock(fibril_mutex_t *); … … 174 194 extern fibril_timer_state_t fibril_timer_clear_locked(fibril_timer_t *); 175 195 196 extern void fibril_semaphore_initialize(fibril_semaphore_t *, long); 197 extern void fibril_semaphore_up(fibril_semaphore_t *); 198 extern void fibril_semaphore_down(fibril_semaphore_t *); 199 176 200 #endif 177 201
Note:
See TracChangeset
for help on using the changeset viewer.