Ignore:
Timestamp:
2007-02-03T13:22:24Z (18 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
f619ec11
Parents:
fa8e7d2
Message:

Merge as_t structure into one and leave the differring parts in as_genarch_t.

Indentation and formatting changes in header files.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • kernel/generic/include/synch/rwlock.h

    rfa8e7d2 r80bcaed  
    4949typedef struct {
    5050        SPINLOCK_DECLARE(lock);
    51         mutex_t exclusive;      /**< Mutex for writers, readers can bypass it if readers_in is positive. */
    52         count_t readers_in;     /**< Number of readers in critical section. */
     51        /**
     52         * Mutex for writers, readers can bypass it if readers_in is positive.
     53         */
     54        mutex_t exclusive;
     55        /** Number of readers in critical section. */
     56        count_t readers_in;
    5357} rwlock_t;
    5458
    5559#define rwlock_write_lock(rwl) \
    56         _rwlock_write_lock_timeout((rwl),SYNCH_NO_TIMEOUT,SYNCH_FLAGS_NONE)
     60        _rwlock_write_lock_timeout((rwl), SYNCH_NO_TIMEOUT, SYNCH_FLAGS_NONE)
    5761#define rwlock_read_lock(rwl) \
    58         _rwlock_read_lock_timeout((rwl),SYNCH_NO_TIMEOUT,SYNCH_FLAGS_NONE)
     62        _rwlock_read_lock_timeout((rwl), SYNCH_NO_TIMEOUT, SYNCH_FLAGS_NONE)
    5963#define rwlock_write_trylock(rwl) \
    60         _rwlock_write_lock_timeout((rwl),SYNCH_NO_TIMEOUT,SYNCH_FLAGS_NON_BLOCKING)
     64        _rwlock_write_lock_timeout((rwl), SYNCH_NO_TIMEOUT, \
     65            SYNCH_FLAGS_NON_BLOCKING)
    6166#define rwlock_read_trylock(rwl) \
    62         _rwlock_read_lock_timeout((rwl),SYNCH_NO_TIMEOUT,SYNCH_FLAGS_NON_BLOCKING)
    63 #define rwlock_write_lock_timeout(rwl,usec) \
    64         _rwlock_write_lock_timeout((rwl),(usec),SYNCH_FLAGS_NONE)
    65 #define rwlock_read_lock_timeout(rwl,usec) \
    66         _rwlock_read_lock_timeout((rwl),(usec),SYNCH_FLAGS_NONE)
     67        _rwlock_read_lock_timeout((rwl), SYNCH_NO_TIMEOUT, \
     68            SYNCH_FLAGS_NON_BLOCKING)
     69#define rwlock_write_lock_timeout(rwl, usec) \
     70        _rwlock_write_lock_timeout((rwl), (usec), SYNCH_FLAGS_NONE)
     71#define rwlock_read_lock_timeout(rwl, usec) \
     72        _rwlock_read_lock_timeout((rwl), (usec), SYNCH_FLAGS_NONE)
    6773
    6874extern void rwlock_initialize(rwlock_t *rwl);
Note: See TracChangeset for help on using the changeset viewer.