Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/c/include/fibril_synch.h

    r7f122e3 r63f8966  
    4343
    4444typedef struct {
    45         fibril_owner_info_t oi;         /* Keep this the first thing. */
    4645        int counter;
    4746        link_t waiters;
    4847} fibril_mutex_t;
    4948
    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 = { \
    5551                .counter = 1, \
    5652                .waiters = { \
     
    5955                } \
    6056        }
    61        
    62 #define FIBRIL_MUTEX_INITIALIZE(name) \
    63         fibril_mutex_t name = FIBRIL_MUTEX_INITIALIZER(name)
    6457
    6558typedef struct {
    66         fibril_owner_info_t oi; /* Keep this the first thing. */
    6759        unsigned writers;
    6860        unsigned readers;
     
    7062} fibril_rwlock_t;
    7163
    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 = { \
    7766                .readers = 0, \
    7867                .writers = 0, \
     
    8372        }
    8473
    85 #define FIBRIL_RWLOCK_INITIALIZE(name) \
    86         fibril_rwlock_t name = FIBRIL_RWLOCK_INITIALIZER(name)
    87 
    8874typedef struct {
    8975        link_t waiters;
    9076} fibril_condvar_t;
    9177
    92 #define FIBRIL_CONDVAR_INITIALIZER(name) \
    93         { \
     78#define FIBRIL_CONDVAR_INITIALIZE(name) \
     79        fibril_condvar_t name = { \
    9480                .waiters = { \
    9581                        .next = &name.waiters, \
     
    9783                } \
    9884        }
    99 
    100 #define FIBRIL_CONDVAR_INITIALIZE(name) \
    101         fibril_condvar_t name = FIBRIL_CONDVAR_INITIALIZER(name)
    10285
    10386extern void fibril_mutex_initialize(fibril_mutex_t *);
Note: See TracChangeset for help on using the changeset viewer.