Changes in uspace/lib/c/include/fibril_synch.h [a55d76b1:a35b458] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/c/include/fibril_synch.h
ra55d76b1 ra35b458 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 165 145 extern void fibril_mutex_initialize(fibril_mutex_t *); 166 146 extern void fibril_mutex_lock(fibril_mutex_t *); … … 194 174 extern fibril_timer_state_t fibril_timer_clear_locked(fibril_timer_t *); 195 175 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 200 176 #endif 201 177
Note:
See TracChangeset
for help on using the changeset viewer.