le_thread.h
Go to the documentation of this file.
1 
168 #ifndef LEGATO_THREAD_INCLUDE_GUARD
169 #define LEGATO_THREAD_INCLUDE_GUARD
170 
171 //--------------------------------------------------------------------------------------------------
177 //--------------------------------------------------------------------------------------------------
178 typedef struct le_thread* le_thread_Ref_t;
179 
180 
181 //--------------------------------------------------------------------------------------------------
193 //--------------------------------------------------------------------------------------------------
194 typedef enum
195 {
231 }
233 
234 #define LE_THREAD_PRIORITY_RT_LOWEST LE_THREAD_PRIORITY_RT_1
235 #define LE_THREAD_PRIORITY_RT_HIGHEST LE_THREAD_PRIORITY_RT_32
236 
237 
238 //--------------------------------------------------------------------------------------------------
247 //--------------------------------------------------------------------------------------------------
248 typedef void* (* le_thread_MainFunc_t)
249 (
250  void* context
251 );
252 
253 
254 //--------------------------------------------------------------------------------------------------
261 //--------------------------------------------------------------------------------------------------
263 (
264  const char* name,
265  le_thread_MainFunc_t mainFunc,
266  void* context
267 );
268 
269 
270 //--------------------------------------------------------------------------------------------------
280 //--------------------------------------------------------------------------------------------------
282 (
283  le_thread_Ref_t thread,
284  le_thread_Priority_t priority
285 );
286 
287 
288 //--------------------------------------------------------------------------------------------------
305 //--------------------------------------------------------------------------------------------------
307 (
308  le_thread_Ref_t thread,
309  size_t size
310 );
312 
313 
314 //--------------------------------------------------------------------------------------------------
320 //--------------------------------------------------------------------------------------------------
322 (
323  le_thread_Ref_t thread
324 );
325 
326 
327 //--------------------------------------------------------------------------------------------------
332 //--------------------------------------------------------------------------------------------------
333 void le_thread_Start
334 (
335  le_thread_Ref_t thread
336 );
337 
338 
339 //--------------------------------------------------------------------------------------------------
361 //--------------------------------------------------------------------------------------------------
363 (
364  le_thread_Ref_t thread,
365  void** resultValuePtr
366 );
369 
370 
371 //--------------------------------------------------------------------------------------------------
375 //--------------------------------------------------------------------------------------------------
376 void le_thread_Exit
377 (
378  void* resultValue
379 );
382 
383 
384 //--------------------------------------------------------------------------------------------------
393 //--------------------------------------------------------------------------------------------------
395 (
396  le_thread_Ref_t threadToCancel
397 );
398 
399 
400 //--------------------------------------------------------------------------------------------------
406 //--------------------------------------------------------------------------------------------------
408 (
409  void
410 );
411 
412 
413 //--------------------------------------------------------------------------------------------------
417 //--------------------------------------------------------------------------------------------------
419 (
420  le_thread_Ref_t threadRef,
421  char* buffPtr,
422  size_t buffSize
423 );
424 
425 
426 //--------------------------------------------------------------------------------------------------
430 //--------------------------------------------------------------------------------------------------
431 const char* le_thread_GetMyName
432 (
433  void
434 );
435 
436 
437 //--------------------------------------------------------------------------------------------------
444 //--------------------------------------------------------------------------------------------------
445 typedef void (* le_thread_Destructor_t)
446 (
447  void* context
448 );
450 
451 
452 //--------------------------------------------------------------------------------------------------
456 //--------------------------------------------------------------------------------------------------
457 typedef struct le_thread_Destructor* le_thread_DestructorRef_t;
458 
459 
460 //--------------------------------------------------------------------------------------------------
471 //--------------------------------------------------------------------------------------------------
473 (
474  le_thread_Destructor_t destructor,
475  void* context
476 );
477 
478 
479 //--------------------------------------------------------------------------------------------------
502 //--------------------------------------------------------------------------------------------------
504 (
505  le_thread_Ref_t thread,
506  le_thread_Destructor_t destructor,
507  void* context
508 );
509 
510 
511 //--------------------------------------------------------------------------------------------------
515 //--------------------------------------------------------------------------------------------------
517 (
518  le_thread_DestructorRef_t destructor
519 );
520 
521 
522 //--------------------------------------------------------------------------------------------------
531 //--------------------------------------------------------------------------------------------------
533 (
534  const char* name
535 );
536 
537 
538 //--------------------------------------------------------------------------------------------------
547 //--------------------------------------------------------------------------------------------------
549 (
550  void
551 );
552 
553 
554 #endif // LEGATO_THREAD_INCLUDE_GUARD
struct le_thread * le_thread_Ref_t
Definition: le_thread.h:178
void *(* le_thread_MainFunc_t)(void *context)
Definition: le_thread.h:249
Real-time priority level 32.
Definition: le_thread.h:230
Real-time priority level 8.
Definition: le_thread.h:206
Real-time priority level 2.
Definition: le_thread.h:200
Real-time priority level 3.
Definition: le_thread.h:201
Real-time priority level 22.
Definition: le_thread.h:220
le_result_t
Definition: le_basics.h:35
void le_thread_RemoveDestructor(le_thread_DestructorRef_t destructor)
le_result_t le_thread_Cancel(le_thread_Ref_t threadToCancel)
struct le_thread_Destructor * le_thread_DestructorRef_t
Definition: le_thread.h:457
Real-time priority level 10.
Definition: le_thread.h:208
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:223
Real-time priority level 12.
Definition: le_thread.h:210
Real-time priority level 28.
Definition: le_thread.h:226
Real-time priority level 7.
Definition: le_thread.h:205
Real-time priority level 27.
Definition: le_thread.h:225
Real-time priority level 26.
Definition: le_thread.h:224
Real-time priority level 29.
Definition: le_thread.h:227
Real-time priority level 23.
Definition: le_thread.h:221
Real-time priority level 14.
Definition: le_thread.h:212
Real-time priority level 16.
Definition: le_thread.h:214
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:215
Real-time priority level 9.
Definition: le_thread.h:207
le_thread_Priority_t
Definition: le_thread.h:194
Real-time priority level 15.
Definition: le_thread.h:213
Real-time priority level 20.
Definition: le_thread.h:218
Real-time priority level 6.
Definition: le_thread.h:204
void le_thread_CleanupLegatoThreadData(void)
Real-time priority level 24.
Definition: le_thread.h:222
Normal, non-real-time priority level. THIS IS THE DEFAULT.
Definition: le_thread.h:197
void le_thread_InitLegatoThreadData(const char *name)
Real-time priority level 21.
Definition: le_thread.h:219
void le_thread_Exit(void *resultValue)
le_thread_DestructorRef_t le_thread_AddDestructor(le_thread_Destructor_t destructor, void *context)
Real-time priority level 31.
Definition: le_thread.h:229
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:216
Real-time priority level 4.
Definition: le_thread.h:202
const char * le_thread_GetMyName(void)
Lowest priority level. Only runs when nothing else to do.
Definition: le_thread.h:196
void le_thread_Start(le_thread_Ref_t thread)
Definition: le_thread.h:198
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:203
Real-time priority level 13.
Definition: le_thread.h:211
void(* le_thread_Destructor_t)(void *context)
Definition: le_thread.h:446
Real-time priority level 11.
Definition: le_thread.h:209
Real-time priority level 30.
Definition: le_thread.h:228
Real-time priority level 19.
Definition: le_thread.h:217