Changeset e9460aa in mainline
- Timestamp:
- 2010-10-10T15:43:06Z (14 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- e721462
- Parents:
- db6c332
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/c/include/fibril_synch.h
rdb6c332 re9460aa 47 47 } fibril_mutex_t; 48 48 49 #define FIBRIL_MUTEX_INITIALIZE (name) \50 fibril_mutex_t name = {\49 #define FIBRIL_MUTEX_INITIALIZER(name) \ 50 { \ 51 51 .counter = 1, \ 52 52 .waiters = { \ … … 55 55 } \ 56 56 } 57 58 #define FIBRIL_MUTEX_INITIALIZE(name) \ 59 fibril_mutex_t name = FIBRIL_MUTEX_INITIALIZER(name) 57 60 58 61 typedef struct { … … 62 65 } fibril_rwlock_t; 63 66 64 #define FIBRIL_RWLOCK_INITIALIZE (name) \65 fibril_rwlock_t name ={ \67 #define FIBRIL_RWLOCK_INITIALIZER(name) \ 68 { \ 66 69 .readers = 0, \ 67 70 .writers = 0, \ … … 72 75 } 73 76 77 #define FIBRIL_RWLOCK_INITIALIZE(name) \ 78 fibril_rwlock_t name = FIBRIL_RWLOCK_INITIALIZER(name) 79 74 80 typedef struct { 75 81 link_t waiters; 76 82 } fibril_condvar_t; 77 83 78 #define FIBRIL_CONDVAR_INITIALIZE (name) \79 fibril_condvar_t name ={ \84 #define FIBRIL_CONDVAR_INITIALIZER(name) \ 85 { \ 80 86 .waiters = { \ 81 87 .next = &name.waiters, \ … … 83 89 } \ 84 90 } 91 92 #define FIBRIL_CONDVAR_INITIALIZE(name) \ 93 fibril_condvar_t name = FIBRIL_CONDVAR_INITIALIZER(name) 85 94 86 95 extern void fibril_mutex_initialize(fibril_mutex_t *);
Note:
See TracChangeset
for help on using the changeset viewer.