ascii-chat 0.11.33
Video chat in your terminal
Loading...
Searching...
No Matches
sync.h
Go to the documentation of this file.
1#pragma once
2
117#include <stdbool.h>
118#include <stdint.h>
119
120#ifdef __cplusplus
121extern "C" {
122#endif
123
124// ============================================================================
125// Public API Functions - always available
126// ============================================================================
127
151
175
198
229void debug_sync_print_state(void);
230
264
297
318
319// ============================================================================
320// Debug Sync API - Thread management and utilities
321// ============================================================================
322
336
337int debug_sync_init(void);
338
345
378
388void debug_sync_destroy(void);
389
409
417void debug_sync_final_cleanup(void);
418
449void debug_sync_trigger_print(void);
450
485void debug_sync_get_stats(uint64_t *total_acquired, uint64_t *total_released, uint32_t *currently_held);
486
517
518#ifdef __cplusplus
519}
520#endif
521
unsigned int uint32_t
Definition common.h:58
unsigned long long uint64_t
Definition common.h:59
void debug_sync_print_state_delayed(uint64_t delay_ns)
Schedule delayed sync state printing on debug thread.
Definition sync.c:604
void debug_sync_set_memory_report_interval(uint64_t interval_ns)
Set periodic memory report interval.
Definition sync.c:630
void debug_sync_set_main_thread_id(void)
Initialize debug synchronization system.
Definition sync.c:639
void debug_sync_check_cond_deadlocks(void)
Check all condition variables for deadlocks.
void debug_sync_print_mutex_state(void)
Print timing state for all named mutexes to stdout/log.
void debug_sync_print_backtrace_delayed(uint64_t delay_ns)
Schedule delayed backtrace printing on debug thread.
Definition sync.c:617
void debug_sync_print_state(void)
Print all synchronization primitive states at once.
Definition sync.c:387
void debug_sync_trigger_print(void)
Trigger sync state print immediately (synchronous)
Definition sync.c:710
void debug_sync_destroy(void)
Destroy debug synchronization system.
Definition sync.c:670
uint64_t debug_sync_get_main_thread_id(void)
Get the main thread ID for memory reporting.
Definition sync.c:649
int debug_sync_start_thread(void)
Start background debug thread for scheduled operations.
Definition sync.c:657
void debug_sync_final_cleanup(void)
Final cleanup of debug allocations at shutdown.
Definition sync.c:595
void debug_sync_cleanup_thread(void)
Stop and clean up background debug thread.
Definition sync.c:674
void debug_sync_print_cond_state(void)
Print timing state for all named condition variables to stdout/log.
void debug_sync_get_stats(uint64_t *total_acquired, uint64_t *total_released, uint32_t *currently_held)
Get synchronization statistics.
Definition sync.c:722
void debug_sync_print_rwlock_state(void)
Print timing state for all named read-write locks to stdout/log.
ClangTool/LibTooling compatibility shim for stdbool.h.
int debug_sync_init(void)
Definition sync.c:644