All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
le_thread.h
Go to the documentation of this file.
1 
146 #ifndef LEGATO_THREAD_INCLUDE_GUARD
147 #define LEGATO_THREAD_INCLUDE_GUARD
148 
149 //--------------------------------------------------------------------------------------------------
155 //--------------------------------------------------------------------------------------------------
156 typedef struct le_thread* le_thread_Ref_t;
157 
158 
159 //--------------------------------------------------------------------------------------------------
171 //--------------------------------------------------------------------------------------------------
172 typedef enum
173 {
209 }
211 
212 #define LE_THREAD_PRIORITY_RT_LOWEST LE_THREAD_PRIORITY_RT_1
213 #define LE_THREAD_PRIORITY_RT_HIGHEST LE_THREAD_PRIORITY_RT_32
214 
215 
216 //--------------------------------------------------------------------------------------------------
225 //--------------------------------------------------------------------------------------------------
226 typedef void* (* le_thread_MainFunc_t)
227 (
228  void* context
229 );
230 
231 
232 //--------------------------------------------------------------------------------------------------
239 //--------------------------------------------------------------------------------------------------
241 (
242  const char* name,
243  le_thread_MainFunc_t mainFunc,
244  void* context
245 );
246 
247 
248 //--------------------------------------------------------------------------------------------------
258 //--------------------------------------------------------------------------------------------------
260 (
261  le_thread_Ref_t thread,
262  le_thread_Priority_t priority
263 );
264 
265 
266 //--------------------------------------------------------------------------------------------------
283 //--------------------------------------------------------------------------------------------------
285 (
286  le_thread_Ref_t thread,
287  size_t size
288 );
290 
291 
292 //--------------------------------------------------------------------------------------------------
298 //--------------------------------------------------------------------------------------------------
300 (
301  le_thread_Ref_t thread
302 );
303 
304 
305 //--------------------------------------------------------------------------------------------------
310 //--------------------------------------------------------------------------------------------------
311 void le_thread_Start
312 (
313  le_thread_Ref_t thread
314 );
315 
316 
317 //--------------------------------------------------------------------------------------------------
338 //--------------------------------------------------------------------------------------------------
340 (
341  le_thread_Ref_t thread,
342  void** resultValuePtr
343 );
346 
347 
348 //--------------------------------------------------------------------------------------------------
352 //--------------------------------------------------------------------------------------------------
353 void le_thread_Exit
354 (
355  void* resultValue
356 );
359 
360 
361 //--------------------------------------------------------------------------------------------------
370 //--------------------------------------------------------------------------------------------------
372 (
373  le_thread_Ref_t threadToCancel
374 );
375 
376 
377 //--------------------------------------------------------------------------------------------------
383 //--------------------------------------------------------------------------------------------------
385 (
386  void
387 );
388 
389 
390 //--------------------------------------------------------------------------------------------------
394 //--------------------------------------------------------------------------------------------------
396 (
397  le_thread_Ref_t threadRef,
398  char* buffPtr,
399  size_t buffSize
400 );
401 
402 
403 //--------------------------------------------------------------------------------------------------
407 //--------------------------------------------------------------------------------------------------
408 const char* le_thread_GetMyName
409 (
410  void
411 );
412 
413 
414 //--------------------------------------------------------------------------------------------------
421 //--------------------------------------------------------------------------------------------------
422 typedef void (* le_thread_Destructor_t)
423 (
424  void* context
425 );
427 
428 
429 //--------------------------------------------------------------------------------------------------
438 //--------------------------------------------------------------------------------------------------
440 (
441  le_thread_Destructor_t destructor,
442  void* context
443 );
444 
445 
446 //--------------------------------------------------------------------------------------------------
469 //--------------------------------------------------------------------------------------------------
471 (
472  le_thread_Ref_t thread,
473  le_thread_Destructor_t destructor,
474  void* context
475 );
476 
477 
478 #endif // LEGATO_THREAD_INCLUDE_GUARD
struct le_thread * le_thread_Ref_t
Definition: le_thread.h:156
Real-time priority level 32.
Definition: le_thread.h:208
Real-time priority level 8.
Definition: le_thread.h:184
Real-time priority level 2.
Definition: le_thread.h:178
Real-time priority level 3.
Definition: le_thread.h:179
Real-time priority level 22.
Definition: le_thread.h:198
le_result_t
Definition: le_basics.h:34
void le_thread_AddDestructor(le_thread_Destructor_t destructor, void *context)
le_result_t le_thread_Cancel(le_thread_Ref_t threadToCancel)
Real-time priority level 10.
Definition: le_thread.h:186
le_result_t le_thread_SetStackSize(le_thread_Ref_t thread, size_t size)
le_result_t le_thread_SetPriority(le_thread_Ref_t thread, le_thread_Priority_t priority)
Real-time priority level 25.
Definition: le_thread.h:201
Real-time priority level 12.
Definition: le_thread.h:188
Real-time priority level 28.
Definition: le_thread.h:204
Real-time priority level 7.
Definition: le_thread.h:183
Real-time priority level 27.
Definition: le_thread.h:203
Real-time priority level 26.
Definition: le_thread.h:202
Real-time priority level 29.
Definition: le_thread.h:205
Real-time priority level 23.
Definition: le_thread.h:199
Real-time priority level 14.
Definition: le_thread.h:190
Real-time priority level 16.
Definition: le_thread.h:192
void le_thread_GetName(le_thread_Ref_t threadRef, char *buffPtr, size_t buffSize)
le_result_t le_thread_Join(le_thread_Ref_t thread, void **resultValuePtr)
void le_thread_SetJoinable(le_thread_Ref_t thread)
le_thread_Ref_t le_thread_GetCurrent(void)
Real-time priority level 17.
Definition: le_thread.h:193
Real-time priority level 9.
Definition: le_thread.h:185
void(* le_thread_Destructor_t)(void *context)
Definition: le_thread.h:423
le_thread_Priority_t
Definition: le_thread.h:172
Real-time priority level 15.
Definition: le_thread.h:191
Real-time priority level 20.
Definition: le_thread.h:196
Real-time priority level 6.
Definition: le_thread.h:182
Real-time priority level 24.
Definition: le_thread.h:200
Normal, non-real-time priority level. THIS IS THE DEFAULT.
Definition: le_thread.h:175
Real-time priority level 21.
Definition: le_thread.h:197
void le_thread_Exit(void *resultValue)
Real-time priority level 31.
Definition: le_thread.h:207
void le_thread_AddChildDestructor(le_thread_Ref_t thread, le_thread_Destructor_t destructor, void *context)
Real-time priority level 18.
Definition: le_thread.h:194
Real-time priority level 4.
Definition: le_thread.h:180
const char * le_thread_GetMyName(void)
Lowest priority level. Only runs when nothing else to do.
Definition: le_thread.h:174
void le_thread_Start(le_thread_Ref_t thread)
Definition: le_thread.h:176
le_thread_Ref_t le_thread_Create(const char *name, le_thread_MainFunc_t mainFunc, void *context)
Real-time priority level 5.
Definition: le_thread.h:181
Real-time priority level 13.
Definition: le_thread.h:189
void *(* le_thread_MainFunc_t)(void *context)
Definition: le_thread.h:227
Real-time priority level 11.
Definition: le_thread.h:187
Real-time priority level 30.
Definition: le_thread.h:206
Real-time priority level 19.
Definition: le_thread.h:195