Motr  M0
Read-write lock

Data Structures

struct  m0_rwlock
 

Functions

M0_INTERNAL void m0_rwlock_init (struct m0_rwlock *lock)
 
M0_INTERNAL void m0_rwlock_fini (struct m0_rwlock *lock)
 
M0_INTERNAL void m0_rwlock_write_lock (struct m0_rwlock *lock)
 
M0_INTERNAL void m0_rwlock_write_unlock (struct m0_rwlock *lock)
 
M0_INTERNAL void m0_rwlock_read_lock (struct m0_rwlock *lock)
 
M0_INTERNAL void m0_rwlock_read_unlock (struct m0_rwlock *lock)
 

Detailed Description

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.

Function Documentation

◆ 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.

Here is the caller graph for this function:

◆ 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.

Here is the caller graph for this function:

◆ m0_rwlock_read_lock()

void m0_rwlock_read_lock ( struct m0_rwlock lock)

take shared lock

Definition at line 52 of file rwlock.c.

Here is the caller graph for this function:

◆ m0_rwlock_read_unlock()

void m0_rwlock_read_unlock ( struct m0_rwlock lock)

release shared lock

Definition at line 57 of file rwlock.c.

Here is the caller graph for this function:

◆ 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.

Here is the caller graph for this function:

◆ 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.

Here is the caller graph for this function: