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

Platform-agnostic read-write lock hooks and utilities. More...

Go to the source code of this file.

Functions

void rwlock_on_rdlock (rwlock_t *rwlock)
 Hook called when a read lock is successfully acquired.
 
void rwlock_on_wrlock (rwlock_t *rwlock)
 Hook called when a write lock is successfully acquired.
 
void rwlock_on_unlock (rwlock_t *rwlock)
 Hook called when an rwlock is unlocked (read or write)
 
int rwlock_format_state (const rwlock_t *rwlock, char *buffer, size_t size)
 Format rwlock timing and state info into buffer.
 
void rwlock_log_state (const rwlock_t *rwlock, const char *file, int line, const char *func)
 Log the state of a read-write lock.
 

Detailed Description

Platform-agnostic read-write lock hooks and utilities.

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

Definition in file rwlock.c.