ascii-chat 0.11.33
Video chat in your terminal
Loading...
Searching...
No Matches
mutex_t Struct Reference

Mutex type (POSIX: pthread_mutex_t with debug tracking) More...

#include <include/ascii-chat/platform/mutex.h>

Data Fields

pthread_mutex_t impl
 Underlying POSIX mutex.
 
const char * name
 Human-readable name for named registry (all builds)
 
uint64_t last_lock_time_ns
 Timestamp of last lock acquisition (nanoseconds)
 
uint64_t last_unlock_time_ns
 Timestamp of last unlock (nanoseconds)
 
uintptr_t currently_held_by_key
 Registry key of thread holding the lock (0 if free)
 
uint64_t lock_count
 Total lock acquisitions.
 
uint64_t unlock_count
 Total unlocks.
 
uint64_t trylock_count
 Total trylock attempts.
 
uint64_t trylock_success_count
 Successful trylocks.
 

Detailed Description

Mutex type (POSIX: pthread_mutex_t with debug tracking)

Definition at line 57 of file platform/mutex.h.

Field Documentation

◆ currently_held_by_key

uintptr_t mutex_t::currently_held_by_key

Registry key of thread holding the lock (0 if free)

Definition at line 63 of file platform/mutex.h.

Referenced by mutex_format_state(), mutex_on_lock(), mutex_on_trylock(), and mutex_on_unlock().

◆ impl

pthread_mutex_t mutex_t::impl

Underlying POSIX mutex.

Definition at line 58 of file platform/mutex.h.

◆ last_lock_time_ns

uint64_t mutex_t::last_lock_time_ns

Timestamp of last lock acquisition (nanoseconds)

Definition at line 61 of file platform/mutex.h.

Referenced by mutex_format_state(), mutex_on_lock(), and mutex_on_trylock().

◆ last_unlock_time_ns

uint64_t mutex_t::last_unlock_time_ns

Timestamp of last unlock (nanoseconds)

Definition at line 62 of file platform/mutex.h.

Referenced by mutex_format_state(), and mutex_on_unlock().

◆ lock_count

uint64_t mutex_t::lock_count

Total lock acquisitions.

Definition at line 64 of file platform/mutex.h.

Referenced by mutex_format_state(), and mutex_on_lock().

◆ name

const char* mutex_t::name

Human-readable name for named registry (all builds)

Definition at line 59 of file platform/mutex.h.

◆ trylock_count

uint64_t mutex_t::trylock_count

Total trylock attempts.

Definition at line 66 of file platform/mutex.h.

Referenced by mutex_format_state(), and mutex_on_trylock().

◆ trylock_success_count

uint64_t mutex_t::trylock_success_count

Successful trylocks.

Definition at line 67 of file platform/mutex.h.

Referenced by mutex_format_state(), and mutex_on_trylock().

◆ unlock_count

uint64_t mutex_t::unlock_count

Total unlocks.

Definition at line 65 of file platform/mutex.h.

Referenced by mutex_format_state(), and mutex_on_unlock().


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