Changes in uspace/lib/c/include/fibril_synch.h [7f122e3:63f8966] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/c/include/fibril_synch.h
r7f122e3 r63f8966 43 43 44 44 typedef struct { 45 fibril_owner_info_t oi; /* Keep this the first thing. */46 45 int counter; 47 46 link_t waiters; 48 47 } fibril_mutex_t; 49 48 50 #define FIBRIL_MUTEX_INITIALIZER(name) \ 51 { \ 52 .oi = { \ 53 .owned_by = NULL \ 54 }, \ 49 #define FIBRIL_MUTEX_INITIALIZE(name) \ 50 fibril_mutex_t name = { \ 55 51 .counter = 1, \ 56 52 .waiters = { \ … … 59 55 } \ 60 56 } 61 62 #define FIBRIL_MUTEX_INITIALIZE(name) \63 fibril_mutex_t name = FIBRIL_MUTEX_INITIALIZER(name)64 57 65 58 typedef struct { 66 fibril_owner_info_t oi; /* Keep this the first thing. */67 59 unsigned writers; 68 60 unsigned readers; … … 70 62 } fibril_rwlock_t; 71 63 72 #define FIBRIL_RWLOCK_INITIALIZER(name) \ 73 { \ 74 .oi = { \ 75 .owned_by = NULL \ 76 }, \ 64 #define FIBRIL_RWLOCK_INITIALIZE(name) \ 65 fibril_rwlock_t name = { \ 77 66 .readers = 0, \ 78 67 .writers = 0, \ … … 83 72 } 84 73 85 #define FIBRIL_RWLOCK_INITIALIZE(name) \86 fibril_rwlock_t name = FIBRIL_RWLOCK_INITIALIZER(name)87 88 74 typedef struct { 89 75 link_t waiters; 90 76 } fibril_condvar_t; 91 77 92 #define FIBRIL_CONDVAR_INITIALIZE R(name) \93 { \78 #define FIBRIL_CONDVAR_INITIALIZE(name) \ 79 fibril_condvar_t name = { \ 94 80 .waiters = { \ 95 81 .next = &name.waiters, \ … … 97 83 } \ 98 84 } 99 100 #define FIBRIL_CONDVAR_INITIALIZE(name) \101 fibril_condvar_t name = FIBRIL_CONDVAR_INITIALIZER(name)102 85 103 86 extern void fibril_mutex_initialize(fibril_mutex_t *);
Note:
See TracChangeset
for help on using the changeset viewer.