ORIGINAL
Loading...
Searching...
No Matches
Classes | Namespaces
semaphores.h File Reference

Semaphore synchronization primitives and guards. More...

#include "config.h"
#include "error.h"
#include "mutex.h"
#include "condition.h"
Include dependency graph for semaphores.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  original::semaphore< MAX_CNT >
 Counting semaphore with maximum count constraint. More...
 
class  original::semaphore< 0 >
 
class  original::semaphoreGuard< MAX_CNT >
 RAII wrapper for automatic semaphore management. More...
 

Namespaces

namespace  original
 Main namespace for the project Original.
 

Detailed Description

Semaphore synchronization primitives and guards.

This header defines the semaphore class template and semaphoreGuard RAII wrapper for managing concurrent access to shared resources with counting semaphores.

The file provides:

Features:

Note
Semaphores follow the classic synchronization pattern where acquire() decrements the count and blocks if zero, while release() increments the count and notifies waiting threads.