Subversion Repositories HelenOS

Rev

Rev 2681 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 2681 Rev 2688
Line 46... Line 46...
46
 
46
 
47
#define RWLOCK_INITIALIZE(rwlock)   \
47
#define RWLOCK_INITIALIZE(rwlock)   \
48
    rwlock_t rwlock = FUTEX_INITIALIZER
48
    rwlock_t rwlock = FUTEX_INITIALIZER
49
 
49
 
50
#define rwlock_initialize(rwlock)   futex_initialize((rwlock), 1)
50
#define rwlock_initialize(rwlock)   futex_initialize((rwlock), 1)
51
#define rwlock_reader_lock(rwlock)  futex_down((rwlock))
51
#define rwlock_read_lock(rwlock)    futex_down((rwlock))
52
#define rwlock_writer_lock(rwlock)  futex_down((rwlock))
52
#define rwlock_write_lock(rwlock)   futex_down((rwlock))
53
#define rwlock_reader_unlock(rwlock)    futex_up((rwlock))
53
#define rwlock_read_unlock(rwlock)  futex_up((rwlock))
54
#define rwlock_writer_unlock(rwlock)    futex_up((rwlock))
54
#define rwlock_write_unlock(rwlock) futex_up((rwlock))
55
 
55
 
56
#endif
56
#endif
57
 
57
 
58
/** @}
58
/** @}
59
 */
59
 */