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

Condition variable type (POSIX: pthread_cond_t with debug tracking) More...

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

Data Fields

pthread_cond_t impl
 Underlying POSIX condition variable.
 
const char * name
 Human-readable name for named registry (all builds)
 
atomic_t waiting_count
 Number of threads currently waiting (functional - needed for all builds)
 
uint64_t last_signal_time_ns
 Timestamp of last signal (nanoseconds)
 
uint64_t last_broadcast_time_ns
 Timestamp of last broadcast (nanoseconds)
 
uint64_t last_wait_time_ns
 Timestamp of last wait (nanoseconds)
 
uintptr_t last_waiting_key
 Registry key of most recent waiter.
 
mutex_t * last_wait_mutex
 Associated mutex at most recent wait (for deadlock detection)
 
const char * last_wait_file
 Callsite file of most recent cond_wait (for deadlock detection)
 
int last_wait_line
 Callsite line of most recent cond_wait (for deadlock detection)
 
const char * last_wait_func
 Callsite function of most recent cond_wait (for deadlock detection)
 
uint64_t wait_count
 Total wait calls.
 
uint64_t signal_count
 Total signal calls.
 
uint64_t broadcast_count
 Total broadcast calls.
 

Detailed Description

Condition variable type (POSIX: pthread_cond_t with debug tracking)

Definition at line 63 of file cond.h.

Field Documentation

◆ broadcast_count

uint64_t cond_t::broadcast_count

Total broadcast calls.

Definition at line 78 of file cond.h.

Referenced by cond_format_state(), and cond_on_broadcast().

◆ impl

pthread_cond_t cond_t::impl

Underlying POSIX condition variable.

Definition at line 64 of file cond.h.

◆ last_broadcast_time_ns

uint64_t cond_t::last_broadcast_time_ns

Timestamp of last broadcast (nanoseconds)

Definition at line 69 of file cond.h.

Referenced by cond_format_state(), and cond_on_broadcast().

◆ last_signal_time_ns

uint64_t cond_t::last_signal_time_ns

Timestamp of last signal (nanoseconds)

Definition at line 68 of file cond.h.

Referenced by cond_format_state(), and cond_on_signal().

◆ last_wait_file

const char* cond_t::last_wait_file

Callsite file of most recent cond_wait (for deadlock detection)

Definition at line 73 of file cond.h.

Referenced by cond_on_wait().

◆ last_wait_func

const char* cond_t::last_wait_func

Callsite function of most recent cond_wait (for deadlock detection)

Definition at line 75 of file cond.h.

Referenced by cond_on_wait().

◆ last_wait_line

int cond_t::last_wait_line

Callsite line of most recent cond_wait (for deadlock detection)

Definition at line 74 of file cond.h.

Referenced by cond_on_wait().

◆ last_wait_mutex

mutex_t* cond_t::last_wait_mutex

Associated mutex at most recent wait (for deadlock detection)

Definition at line 72 of file cond.h.

Referenced by cond_on_wait().

◆ last_wait_time_ns

uint64_t cond_t::last_wait_time_ns

Timestamp of last wait (nanoseconds)

Definition at line 70 of file cond.h.

Referenced by cond_format_state(), and cond_on_wait().

◆ last_waiting_key

uintptr_t cond_t::last_waiting_key

Registry key of most recent waiter.

Definition at line 71 of file cond.h.

Referenced by cond_on_wait().

◆ name

const char* cond_t::name

Human-readable name for named registry (all builds)

Definition at line 65 of file cond.h.

◆ signal_count

uint64_t cond_t::signal_count

Total signal calls.

Definition at line 77 of file cond.h.

Referenced by cond_format_state(), and cond_on_signal().

◆ wait_count

uint64_t cond_t::wait_count

Total wait calls.

Definition at line 76 of file cond.h.

Referenced by cond_format_state(), and cond_on_wait().

◆ waiting_count

atomic_t cond_t::waiting_count

Number of threads currently waiting (functional - needed for all builds)

Definition at line 66 of file cond.h.

Referenced by cond_format_state(), cond_on_broadcast(), cond_on_signal(), and cond_on_wait().


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