ascii-chat
Binary v0.15.83-53-gb711d8720
Library lib/v0.3.2-701-gb711d8720
Video chat in your terminal
Loading...
Searching...
No Matches
rwlock_t Struct Reference

Read-write lock type (POSIX: pthread_rwlock_t with debug tracking). More...

#include <include/ascii-chat/os/rwlock.h>

Public Member Functions

 _Atomic (uint64_t) last_rdlock_time_ns
 Timestamp of last read lock acquisition (nanoseconds).
 _Atomic (uint64_t) last_wrlock_time_ns
 Timestamp of last write lock acquisition (nanoseconds).
 _Atomic (uint64_t) last_unlock_time_ns
 Timestamp of last unlock (nanoseconds).
 _Atomic (uintptr_t) write_held_by_key
 Registry key of thread holding write lock (0 if not held).
 _Atomic (uint64_t) rdlock_count
 Total read lock acquisitions.
 _Atomic (uint64_t) wrlock_count
 Total write lock acquisitions.
 _Atomic (uint64_t) unlock_count
 Total unlocks.

Data Fields

pthread_rwlock_t impl
 Underlying POSIX rwlock.
const char * name
 Human-readable name for named registry (all builds).
atomic_t read_lock_count
 Number of threads holding read locks (thread-safe atomic).

Detailed Description

Read-write lock type (POSIX: pthread_rwlock_t with debug tracking).

Definition at line 63 of file rwlock.h.

Member Function Documentation

◆ _Atomic() [1/5]

rwlock_t::_Atomic ( uint64_t )

Timestamp of last unlock (nanoseconds).

◆ _Atomic() [2/5]

rwlock_t::_Atomic ( uint64_t )

Timestamp of last write lock acquisition (nanoseconds).

◆ _Atomic() [3/5]

rwlock_t::_Atomic ( uint64_t )

Total read lock acquisitions.

◆ _Atomic() [4/5]

rwlock_t::_Atomic ( uint64_t )

Total unlocks.

◆ _Atomic() [5/5]

rwlock_t::_Atomic ( uint64_t )

Total write lock acquisitions.


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