RTI Connext Micro C++ API Version 4.2.0
Loading...
Searching...
No Matches
OSAPI Semaphore

Abstract Semaphore API. More...

Macros

#define OSAPI_SEMAPHORE_TIMEOUT_INFINITE   -1
 If OSAPI_Semaphore_take is called with OSAPI_SEMAPHORE_TIMEOUT_INFINITE as timeout, OSAPI_Semaphore_take will not return until the semaphore is signaled.
 
#define OSAPI_SEMAPHORE_RESULT_OK   0
 If OSAPI_Semaphore_take succeeds and the semaphore is signaled within the timeout period, OSAPI_Semaphore_take returns TRUE and sets the failure reason to OSAPI_SEMAPHORE_RESULT_OK.
 
#define OSAPI_SEMAPHORE_RESULT_TIMEOUT   1
 If OSAPI_Semaphore_take was called with a timeout value different from OSAPI_SEMAPHORE_TIMEOUT_INFINITE, and the sempahore was not signaled before the timeout expired, waiting for the semaphore to unblock timed out, OSAPI_Semaphore_take TRUE and sets the failure reason to OSAPI_SEMAPHORE_RESULT_TIMEOUT.
 
#define OSAPI_SEMAPHORE_RESULT_ERROR   2
 If OSAPI_Semaphore_take fails for an unknown reason, OSAPI_Semaphore_take returns FALSE and sets the failure reason to OSAPI_SEMAPHORE_RESULT_ERROR.
 

Typedefs

typedef struct OSAPI_Semaphore OSAPI_Semaphore_T
 Abstract Semaphore type.
 

Functions

OSPSLDllExport RTI_BOOL OSAPI_Semaphore_delete (OSAPI_Semaphore_T *self)
 Delete a semaphore.
 

Detailed Description

Abstract Semaphore API.

Macro Definition Documentation

◆ OSAPI_SEMAPHORE_TIMEOUT_INFINITE

#define OSAPI_SEMAPHORE_TIMEOUT_INFINITE   -1

If OSAPI_Semaphore_take is called with OSAPI_SEMAPHORE_TIMEOUT_INFINITE as timeout, OSAPI_Semaphore_take will not return until the semaphore is signaled.

◆ OSAPI_SEMAPHORE_RESULT_OK

#define OSAPI_SEMAPHORE_RESULT_OK   0

If OSAPI_Semaphore_take succeeds and the semaphore is signaled within the timeout period, OSAPI_Semaphore_take returns TRUE and sets the failure reason to OSAPI_SEMAPHORE_RESULT_OK.

◆ OSAPI_SEMAPHORE_RESULT_TIMEOUT

#define OSAPI_SEMAPHORE_RESULT_TIMEOUT   1

If OSAPI_Semaphore_take was called with a timeout value different from OSAPI_SEMAPHORE_TIMEOUT_INFINITE, and the sempahore was not signaled before the timeout expired, waiting for the semaphore to unblock timed out, OSAPI_Semaphore_take TRUE and sets the failure reason to OSAPI_SEMAPHORE_RESULT_TIMEOUT.

◆ OSAPI_SEMAPHORE_RESULT_ERROR

#define OSAPI_SEMAPHORE_RESULT_ERROR   2

If OSAPI_Semaphore_take fails for an unknown reason, OSAPI_Semaphore_take returns FALSE and sets the failure reason to OSAPI_SEMAPHORE_RESULT_ERROR.

Typedef Documentation

◆ OSAPI_Semaphore_T

typedef struct OSAPI_Semaphore OSAPI_Semaphore_T

Abstract Semaphore type.

Function Documentation

◆ OSAPI_Semaphore_delete()

OSPSLDllExport RTI_BOOL OSAPI_Semaphore_delete ( OSAPI_Semaphore_T * self)

Delete a semaphore.

Parameters
[in]selfSemaphore created with OSAPI_Semaphore_new.
Returns
RTI_TRUE on success, RTI_FALSE on failure.

See Also OSAPI_Semaphore_new