libacfutils
A general purpose library of utility functions designed to make it easier to develop addons for the X-Plane flight simulator.
Loading...
Searching...
No Matches
Data Fields
rwmutex_t Struct Reference

#include <thread.h>

Collaboration diagram for rwmutex_t:
Collaboration graph
[legend]

Data Fields

mutex_t lock
 
condvar_t cv
 
bool_t write_locked
 
thread_id_t writer
 
unsigned refcount
 
list_t waiters
 

Detailed Description

This is a read-write mutex. RWMutexes are mutexes which allow multiple threads to acquire a read lock, but only a single thread to acquire a write lock.

Use rwmutex_init() to initialize a new rwmutex_t object. To destroy an rwmutex_t, use rwmutex_destroy(). Acquiring and relinquishing an rwmutex_t is done using rwmutex_enter() and rwmutex_exit().

See also
rwmutex_init()
rwmutex_destroy()
rwmutex_enter()
rwmutex_exit()
rwmutex_held_write()

Definition at line 1041 of file thread.h.

Field Documentation

◆ cv

Definition at line 1043 of file thread.h.

◆ lock

mutex_t lock

Definition at line 1042 of file thread.h.

◆ refcount

unsigned refcount

Definition at line 1046 of file thread.h.

◆ waiters

list_t waiters

Definition at line 1047 of file thread.h.

◆ write_locked

bool_t write_locked

Definition at line 1044 of file thread.h.

◆ writer

thread_id_t writer

Definition at line 1045 of file thread.h.


The documentation for this struct was generated from the following file: