le_thread.h
Go to the documentation of this file.
1 
157 #ifndef LEGATO_THREAD_INCLUDE_GUARD
158 #define LEGATO_THREAD_INCLUDE_GUARD
159 
160 //--------------------------------------------------------------------------------------------------
166 //--------------------------------------------------------------------------------------------------
167 typedef struct le_thread* le_thread_Ref_t;
168 
169 
170 //--------------------------------------------------------------------------------------------------
182 //--------------------------------------------------------------------------------------------------
183 typedef enum
184 {
220 }
222 
223 #define LE_THREAD_PRIORITY_RT_LOWEST LE_THREAD_PRIORITY_RT_1
224 #define LE_THREAD_PRIORITY_RT_HIGHEST LE_THREAD_PRIORITY_RT_32
225 
226 
227 //--------------------------------------------------------------------------------------------------
236 //--------------------------------------------------------------------------------------------------
237 typedef void* (* le_thread_MainFunc_t)
238 (
239  void* context
240 );
241 
242 
243 //--------------------------------------------------------------------------------------------------
250 //--------------------------------------------------------------------------------------------------
252 (
253  const char* name,
254  le_thread_MainFunc_t mainFunc,
255  void* context
256 );
257 
258 
259 //--------------------------------------------------------------------------------------------------
269 //--------------------------------------------------------------------------------------------------
271 (
272  le_thread_Ref_t thread,
273  le_thread_Priority_t priority
274 );
275 
276 
277 //--------------------------------------------------------------------------------------------------
294 //--------------------------------------------------------------------------------------------------
296 (
297  le_thread_Ref_t thread,
298  size_t size
299 );
301 
302 
303 //--------------------------------------------------------------------------------------------------
309 //--------------------------------------------------------------------------------------------------
311 (
312  le_thread_Ref_t thread
313 );
314 
315 
316 //--------------------------------------------------------------------------------------------------
321 //--------------------------------------------------------------------------------------------------
322 void le_thread_Start
323 (
324  le_thread_Ref_t thread
325 );
326 
327 
328 //--------------------------------------------------------------------------------------------------
350 //--------------------------------------------------------------------------------------------------
352 (
353  le_thread_Ref_t thread,
354  void** resultValuePtr
355 );
358 
359 
360 //--------------------------------------------------------------------------------------------------
364 //--------------------------------------------------------------------------------------------------
365 void le_thread_Exit
366 (
367  void* resultValue
368 );
371 
372 
373 //--------------------------------------------------------------------------------------------------
382 //--------------------------------------------------------------------------------------------------
384 (
385  le_thread_Ref_t threadToCancel
386 );
387 
388 
389 //--------------------------------------------------------------------------------------------------
395 //--------------------------------------------------------------------------------------------------
397 (
398  void
399 );
400 
401 
402 //--------------------------------------------------------------------------------------------------
406 //--------------------------------------------------------------------------------------------------
408 (
409  le_thread_Ref_t threadRef,
410  char* buffPtr,
411  size_t buffSize
412 );
413 
414 
415 //--------------------------------------------------------------------------------------------------
419 //--------------------------------------------------------------------------------------------------
420 const char* le_thread_GetMyName
421 (
422  void
423 );
424 
425 
426 //--------------------------------------------------------------------------------------------------
433 //--------------------------------------------------------------------------------------------------
434 typedef void (* le_thread_Destructor_t)
435 (
436  void* context
437 );
439 
440 
441 //--------------------------------------------------------------------------------------------------
450 //--------------------------------------------------------------------------------------------------
452 (
453  le_thread_Destructor_t destructor,
454  void* context
455 );
456 
457 
458 //--------------------------------------------------------------------------------------------------
481 //--------------------------------------------------------------------------------------------------
483 (
484  le_thread_Ref_t thread,
485  le_thread_Destructor_t destructor,
486  void* context
487 );
488 
489 
490 //--------------------------------------------------------------------------------------------------
499 //--------------------------------------------------------------------------------------------------
501 (
502  const char* name
503 );
504 
505 
506 //--------------------------------------------------------------------------------------------------
515 //--------------------------------------------------------------------------------------------------
517 (
518  void
519 );
520 
521 
522 #endif // LEGATO_THREAD_INCLUDE_GUARD
struct le_thread * le_thread_Ref_t
Definition: le_thread.h:167
void *(* le_thread_MainFunc_t)(void *context)
Definition: le_thread.h:238
Real-time priority level 32.
Definition: le_thread.h:219
Real-time priority level 8.
Definition: le_thread.h:195
Real-time priority level 2.
Definition: le_thread.h:189
Real-time priority level 3.
Definition: le_thread.h:190
Real-time priority level 22.
Definition: le_thread.h:209
le_result_t
Definition: le_basics.h:35
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:197
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:212
Real-time priority level 12.
Definition: le_thread.h:199
Real-time priority level 28.
Definition: le_thread.h:215
Real-time priority level 7.
Definition: le_thread.h:194
Real-time priority level 27.
Definition: le_thread.h:214
Real-time priority level 26.
Definition: le_thread.h:213
Real-time priority level 29.
Definition: le_thread.h:216
Real-time priority level 23.
Definition: le_thread.h:210
Real-time priority level 14.
Definition: le_thread.h:201
Real-time priority level 16.
Definition: le_thread.h:203
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:204
Real-time priority level 9.
Definition: le_thread.h:196
le_thread_Priority_t
Definition: le_thread.h:183
Real-time priority level 15.
Definition: le_thread.h:202
Real-time priority level 20.
Definition: le_thread.h:207
Real-time priority level 6.
Definition: le_thread.h:193
void le_thread_CleanupLegatoThreadData(void)
Real-time priority level 24.
Definition: le_thread.h:211
Normal, non-real-time priority level. THIS IS THE DEFAULT.
Definition: le_thread.h:186
void le_thread_InitLegatoThreadData(const char *name)
Real-time priority level 21.
Definition: le_thread.h:208
void le_thread_Exit(void *resultValue)
Real-time priority level 31.
Definition: le_thread.h:218
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:205
Real-time priority level 4.
Definition: le_thread.h:191
const char * le_thread_GetMyName(void)
void(* le_thread_Destructor_t)(void *context)
Definition: le_thread.h:435
Lowest priority level. Only runs when nothing else to do.
Definition: le_thread.h:185
void le_thread_Start(le_thread_Ref_t thread)
Definition: le_thread.h:187
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:192
Real-time priority level 13.
Definition: le_thread.h:200
Real-time priority level 11.
Definition: le_thread.h:198
Real-time priority level 30.
Definition: le_thread.h:217
Real-time priority level 19.
Definition: le_thread.h:206