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