ReXGlue SDK
Loading...
Searching...
No Matches
rex::platform::Semaphore Class Referenceabstract

#include <rex/platform/sync.h>

Inheritance diagram for rex::platform::Semaphore:
[legend]

Public Member Functions

virtual bool Release (int release_count, int *out_previous_count)=0
Public Member Functions inherited from rex::platform::WaitHandle
virtual void * GetNativeHandle () const =0

Static Public Member Functions

static std::unique_ptr< Semaphore > Create (int initial_count, int maximum_count)

Detailed Description

Semaphore object modeled on the Win32 semaphore.

Member Function Documentation

◆ Create()

std::unique_ptr< Semaphore > rex::platform::Semaphore::Create ( int initial_count,
int maximum_count )
static

Creates a semaphore, signaled while its count is above 0.

Parameters
initial_countStarting count, from 0 to maximum_count.
Returns
The semaphore, or null on failure.

◆ Release()

virtual bool rex::platform::Semaphore::Release ( int release_count,
int * out_previous_count )
pure virtual

Raises the count.

Parameters
release_countAmount to add, above 0.
out_previous_countReceives the previous count, may be null.
Returns
False when the count would pass maximum_count.

The documentation for this class was generated from the following file: