Subversion Repositories HelenOS-historic

Rev

Rev 430 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 430 Rev 483
Line 41... Line 41...
41
};
41
};
42
 
42
 
43
struct rwlock {
43
struct rwlock {
44
    spinlock_t lock;
44
    spinlock_t lock;
45
    mutex_t exclusive;  /**< Mutex for writers, readers can bypass it if readers_in is positive. */
45
    mutex_t exclusive;  /**< Mutex for writers, readers can bypass it if readers_in is positive. */
46
    int readers_in;     /**< Number of readers in critical section. */
46
    count_t readers_in; /**< Number of readers in critical section. */
47
};
47
};
48
 
48
 
49
#define rwlock_write_lock(rwl) \
49
#define rwlock_write_lock(rwl) \
50
    _rwlock_write_lock_timeout((rwl),SYNCH_NO_TIMEOUT,SYNCH_BLOCKING)
50
    _rwlock_write_lock_timeout((rwl),SYNCH_NO_TIMEOUT,SYNCH_BLOCKING)
51
#define rwlock_read_lock(rwl) \
51
#define rwlock_read_lock(rwl) \