Rev 534 | Rev 557 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 534 | Rev 552 | ||
---|---|---|---|
Line 73... | Line 73... | ||
73 | * Initialize reader/writer lock. |
73 | * Initialize reader/writer lock. |
74 | * |
74 | * |
75 | * @param rwl Reader/Writer lock. |
75 | * @param rwl Reader/Writer lock. |
76 | */ |
76 | */ |
77 | void rwlock_initialize(rwlock_t *rwl) { |
77 | void rwlock_initialize(rwlock_t *rwl) { |
78 | spinlock_initialize(&rwl->lock); |
78 | spinlock_initialize(&rwl->lock, "rwlock"); |
79 | mutex_initialize(&rwl->exclusive); |
79 | mutex_initialize(&rwl->exclusive); |
80 | rwl->readers_in = 0; |
80 | rwl->readers_in = 0; |
81 | } |
81 | } |
82 | 82 | ||
83 | /** Acquire reader/writer lock for reading |
83 | /** Acquire reader/writer lock for reading |