Go to the source code of this file.
Typedefs | |
typedef struct le_sem_t * | le_sem_Ref_t |
Functions | |
le_sem_Ref_t | le_sem_Create (const char *name, int32_t initialCount) |
le_sem_Ref_t | le_sem_CreateTraceable (const char *name, int32_t initialCount) |
void | le_sem_Delete (le_sem_Ref_t semaphorePtr) |
le_sem_Ref_t | le_sem_FindSemaphore (const char *name) |
void | le_sem_Wait (le_sem_Ref_t semaphorePtr) |
le_result_t | le_sem_TryWait (le_sem_Ref_t semaphorePtr) |
le_result_t | le_sem_WaitWithTimeOut (le_sem_Ref_t semaphorePtr, le_clk_Time_t timeToWait) |
void | le_sem_Post (le_sem_Ref_t semaphorePtr) |
int | le_sem_GetValue (le_sem_Ref_t semaphorePtr) |
Legato Semaphore API include file.
Copyright (C) Sierra Wireless, Inc. 2014. All rights reserved. Use of this work is subject to license.
typedef struct le_sem_t* le_sem_Ref_t |
Reference to Semaphore structure.
le_sem_Ref_t le_sem_Create | ( | const char * | name, |
int32_t | initialCount | ||
) |
Create a semaphore shared by threads within the same process.
[in] | name | Name of the semaphore. |
[in] | initialCount | Initial number of semaphore. |
le_sem_Ref_t le_sem_CreateTraceable | ( | const char * | name, |
int32_t | initialCount | ||
) |
Create a traceable semaphore shared by threads within the same process.
[in] | name | Name of the semaphore. |
[in] | initialCount | Initial number of semaphore. |
void le_sem_Delete | ( | le_sem_Ref_t | semaphorePtr | ) |
Delete a semaphore.
[in] | semaphorePtr | Pointer to the semaphore. |
le_sem_Ref_t le_sem_FindSemaphore | ( | const char * | name | ) |
Finds a specified semaphore's name.
[in] | name | Name of the semaphore. |
int le_sem_GetValue | ( | le_sem_Ref_t | semaphorePtr | ) |
Get the value of a semaphore.
[in] | semaphorePtr | Pointer to the semaphore. |
void le_sem_Post | ( | le_sem_Ref_t | semaphorePtr | ) |
Post a semaphore.
[in] | semaphorePtr | Pointer to the semaphore. |
le_result_t le_sem_TryWait | ( | le_sem_Ref_t | semaphorePtr | ) |
Try to wait for a semaphore.
It's the same as le_sem_Wait, except if it can't be immediately performed, then returns an LE_WOULD_BLOCK instead of blocking it.
[in] | semaphorePtr | Pointer to the semaphore. |
void le_sem_Wait | ( | le_sem_Ref_t | semaphorePtr | ) |
Wait for a semaphore.
[in] | semaphorePtr | Pointer to the semaphore. |
le_result_t le_sem_WaitWithTimeOut | ( | le_sem_Ref_t | semaphorePtr, |
le_clk_Time_t | timeToWait | ||
) |
Wait for a semaphore with a limit on how long to wait.
[in] | semaphorePtr | Pointer to the semaphore. |
[in] | timeToWait | Time to wait |