Subversion Repositories HelenOS

Rev

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

Rev 3059 Rev 3186
Line 80... Line 80...
80
 *
80
 *
81
 * @param rwl Reader/Writer lock.
81
 * @param rwl Reader/Writer lock.
82
 */
82
 */
83
void rwlock_initialize(rwlock_t *rwl) {
83
void rwlock_initialize(rwlock_t *rwl) {
84
    spinlock_initialize(&rwl->lock, "rwlock_t");
84
    spinlock_initialize(&rwl->lock, "rwlock_t");
85
    mutex_initialize(&rwl->exclusive);
85
    mutex_initialize(&rwl->exclusive, MUTEX_PASSIVE);
86
    rwl->readers_in = 0;
86
    rwl->readers_in = 0;
87
}
87
}
88
 
88
 
89
/** Acquire reader/writer lock for reading
89
/** Acquire reader/writer lock for reading
90
 *
90
 *