Rev 2787 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 2787 | Rev 4692 | ||
---|---|---|---|
Line 51... | Line 51... | ||
51 | /** |
51 | /** |
52 | * Mutex for writers, readers can bypass it if readers_in is positive. |
52 | * Mutex for writers, readers can bypass it if readers_in is positive. |
53 | */ |
53 | */ |
54 | mutex_t exclusive; |
54 | mutex_t exclusive; |
55 | /** Number of readers in critical section. */ |
55 | /** Number of readers in critical section. */ |
56 | count_t readers_in; |
56 | size_t readers_in; |
57 | } rwlock_t; |
57 | } rwlock_t; |
58 | 58 | ||
59 | #define rwlock_write_lock(rwl) \ |
59 | #define rwlock_write_lock(rwl) \ |
60 | _rwlock_write_lock_timeout((rwl), SYNCH_NO_TIMEOUT, SYNCH_FLAGS_NONE) |
60 | _rwlock_write_lock_timeout((rwl), SYNCH_NO_TIMEOUT, SYNCH_FLAGS_NONE) |
61 | #define rwlock_read_lock(rwl) \ |
61 | #define rwlock_read_lock(rwl) \ |