ascii-chat 0.11.33
Video chat in your terminal
Loading...
Searching...
No Matches
mutex.c File Reference

Platform-agnostic mutex hooks and utilities. More...

Go to the source code of this file.

Functions

void mutex_on_lock (mutex_t *mutex)
 Hook called when a mutex is successfully locked.
 
void mutex_on_unlock (mutex_t *mutex)
 Hook called when a mutex is unlocked.
 
void mutex_on_trylock (mutex_t *mutex, bool success)
 Hook called when a mutex trylock is attempted.
 
int mutex_format_state (const mutex_t *mutex, char *buffer, size_t size)
 Format mutex timing and state info into buffer.
 
void mutex_log_state (const mutex_t *mutex, const char *file, int line, const char *func)
 Log the state of a mutex.
 

Detailed Description

Platform-agnostic mutex hooks and utilities.

This file provides hook functions that can be called from platform-specific mutex implementations to record events and debug information. All hooks are debug-only and disabled in release builds.

Definition in file platform/mutex.c.