le_semaphore.h
Go to the documentation of this file.
1 
59 #ifndef LEGATO_SEMAPHORE_INCLUDE_GUARD
60 #define LEGATO_SEMAPHORE_INCLUDE_GUARD
61 
62 //--------------------------------------------------------------------------------------------------
67 //--------------------------------------------------------------------------------------------------
68 typedef struct le_sem_t* le_sem_Ref_t;
69 
70 //--------------------------------------------------------------------------------------------------
76 //--------------------------------------------------------------------------------------------------
78 (
79  const char* name,
80  int32_t initialCount
81 );
82 
83 //--------------------------------------------------------------------------------------------------
88 //--------------------------------------------------------------------------------------------------
89 void le_sem_Delete
90 (
91  le_sem_Ref_t semaphorePtr
92 );
93 
94 //--------------------------------------------------------------------------------------------------
101 //--------------------------------------------------------------------------------------------------
103 (
104  const char* name
105 );
106 
107 //--------------------------------------------------------------------------------------------------
113 //--------------------------------------------------------------------------------------------------
114 void le_sem_Wait
115 (
116  le_sem_Ref_t semaphorePtr
117 );
118 
119 //--------------------------------------------------------------------------------------------------
129 //--------------------------------------------------------------------------------------------------
131 (
132  le_sem_Ref_t semaphorePtr
133 );
134 
135 //--------------------------------------------------------------------------------------------------
145 //--------------------------------------------------------------------------------------------------
147 (
148  le_sem_Ref_t semaphorePtr,
149  le_clk_Time_t timeToWait
150 );
151 
152 //--------------------------------------------------------------------------------------------------
158 //--------------------------------------------------------------------------------------------------
159 void le_sem_Post
160 (
161  le_sem_Ref_t semaphorePtr
162 );
163 
164 //--------------------------------------------------------------------------------------------------
170 //--------------------------------------------------------------------------------------------------
171 int le_sem_GetValue
172 (
173  le_sem_Ref_t semaphorePtr
174 );
175 
176 #endif // LEGATO_SEMAPHORE_INCLUDE_GUARD
le_result_t le_sem_TryWait(le_sem_Ref_t semaphorePtr)
le_result_t
Definition: le_basics.h:35
struct le_sem_t * le_sem_Ref_t
Definition: le_semaphore.h:68
le_sem_Ref_t le_sem_FindSemaphore(const char *name)
void le_sem_Post(le_sem_Ref_t semaphorePtr)
Definition: le_clock.h:92
void le_sem_Delete(le_sem_Ref_t semaphorePtr)
void le_sem_Wait(le_sem_Ref_t semaphorePtr)
le_result_t le_sem_WaitWithTimeOut(le_sem_Ref_t semaphorePtr, le_clk_Time_t timeToWait)
le_sem_Ref_t le_sem_Create(const char *name, int32_t initialCount)
int le_sem_GetValue(le_sem_Ref_t semaphorePtr)