Utilities API Reference#

Overview#

This module provides utilities for the SCORE Time Synchronization system.

Namespace: score_time::utils#

PthreadLockGuard#

class score_time::utils::PthreadLockGuard#

RAII wrapper for pthread_mutex_t Automatically locks the mutex on construction and unlocks on destruction. This prevents deadlocks from forgotten unlocks or early returns.

Defined in: pthread_lock_guard.hpp

Usage: RAII wrapper for automatic resource management.

Examples#

See the test files for usage examples:

  • Unit tests: tests/cpp/

  • Integration tests: tests/integration/