Linux kernel rwlock.
Linux kernel implementation is based on rw_semaphore (linux/rwsem.h).
User space implementation is based on a posix rwlock (pthread_rwlock_init(3))
User space rwlock.
◆ m0_rwlock_fini()
M0_INTERNAL void m0_rwlock_fini |
( |
struct m0_rwlock * |
lock | ) |
|
read-write lock destructor
Definition at line 37 of file rwlock.c.
◆ m0_rwlock_init()
M0_INTERNAL void m0_rwlock_init |
( |
struct m0_rwlock * |
lock | ) |
|
read-write lock constructor
Definition at line 32 of file rwlock.c.
◆ m0_rwlock_read_lock()
void m0_rwlock_read_lock |
( |
struct m0_rwlock * |
lock | ) |
|
take shared lock
Definition at line 52 of file rwlock.c.
◆ m0_rwlock_read_unlock()
void m0_rwlock_read_unlock |
( |
struct m0_rwlock * |
lock | ) |
|
release shared lock
Definition at line 57 of file rwlock.c.
◆ m0_rwlock_write_lock()
M0_INTERNAL void m0_rwlock_write_lock |
( |
struct m0_rwlock * |
lock | ) |
|
take exclusive lock
Definition at line 42 of file rwlock.c.
◆ m0_rwlock_write_unlock()
M0_INTERNAL void m0_rwlock_write_unlock |
( |
struct m0_rwlock * |
lock | ) |
|
release exclusive lock
Definition at line 47 of file rwlock.c.