Ignore:
File:
1 edited

Legend:

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

    rda1bafb rd99c1d2  
    4848
    4949typedef struct {
    50         IRQ_SPINLOCK_DECLARE(lock);
    51        
     50        SPINLOCK_DECLARE(lock);
    5251        /**
    5352         * Mutex for writers, readers can bypass it if readers_in is positive.
    54          *
    5553         */
    5654        mutex_t exclusive;
    57        
    5855        /** Number of readers in critical section. */
    5956        size_t readers_in;
     
    6259#define rwlock_write_lock(rwl) \
    6360        _rwlock_write_lock_timeout((rwl), SYNCH_NO_TIMEOUT, SYNCH_FLAGS_NONE)
    64 
    6561#define rwlock_read_lock(rwl) \
    6662        _rwlock_read_lock_timeout((rwl), SYNCH_NO_TIMEOUT, SYNCH_FLAGS_NONE)
    67 
    6863#define rwlock_write_trylock(rwl) \
    6964        _rwlock_write_lock_timeout((rwl), SYNCH_NO_TIMEOUT, \
    7065            SYNCH_FLAGS_NON_BLOCKING)
    71 
    7266#define rwlock_read_trylock(rwl) \
    7367        _rwlock_read_lock_timeout((rwl), SYNCH_NO_TIMEOUT, \
    7468            SYNCH_FLAGS_NON_BLOCKING)
    75 
    7669#define rwlock_write_lock_timeout(rwl, usec) \
    7770        _rwlock_write_lock_timeout((rwl), (usec), SYNCH_FLAGS_NONE)
    78 
    7971#define rwlock_read_lock_timeout(rwl, usec) \
    8072        _rwlock_read_lock_timeout((rwl), (usec), SYNCH_FLAGS_NONE)
    8173
    82 extern void rwlock_initialize(rwlock_t *);
    83 extern void rwlock_read_unlock(rwlock_t *);
    84 extern void rwlock_write_unlock(rwlock_t *);
    85 extern int _rwlock_read_lock_timeout(rwlock_t *, uint32_t, unsigned int);
    86 extern int _rwlock_write_lock_timeout(rwlock_t *, uint32_t, unsigned int);
     74extern void rwlock_initialize(rwlock_t *rwl);
     75extern void rwlock_read_unlock(rwlock_t *rwl);
     76extern void rwlock_write_unlock(rwlock_t *rwl);
     77extern int _rwlock_read_lock_timeout(rwlock_t *rwl, uint32_t usec, int flags);
     78extern int _rwlock_write_lock_timeout(rwlock_t *rwl, uint32_t usec, int flags);
    8779
    8880#endif
Note: See TracChangeset for help on using the changeset viewer.