Choco OS  V.0.16.9.0
Join to the chocolate world
oc_threadman.h
Go to the documentation of this file.
1 
28 #ifndef INC_KERNEL_OC_THREADMAN_H_
29 #define INC_KERNEL_OC_THREADMAN_H_
30 
31 #include <oc_errors.h>
32 #include <oc_thread.h>
33 #include <oc_list.h>
34 #include <oc_memory.h>
35 
41 #define _________________________________________TYPES_SECTION______________________________________________________________________________
42 
45 typedef enum
46 {
47  oC_AutoStackMethod_Disabled ,
48  oC_AutoStackMethod_RerunThread ,
49 } oC_AutoStackMethod_t;
50 
51 #undef _________________________________________TYPES_SECTION______________________________________________________________________________
52 
59 #define _________________________________________FUNCTIONS_SECTION__________________________________________________________________________
60 
63 extern oC_ErrorCode_t oC_ThreadMan_TurnOn ( void );
64 extern oC_ErrorCode_t oC_ThreadMan_TurnOff ( void );
65 extern oC_ErrorCode_t oC_ThreadMan_SetSystemTimerFrequency ( oC_Frequency_t Frequency );
66 extern oC_Frequency_t oC_ThreadMan_GetSystemTimerFrequency ( void );
67 extern oC_ErrorCode_t oC_ThreadMan_AddThread ( oC_Thread_t Thread );
68 extern oC_ErrorCode_t oC_ThreadMan_RemoveThread ( oC_Thread_t Thread );
69 extern bool oC_ThreadMan_ContainsThread ( oC_Thread_t Thread );
70 extern oC_Thread_t oC_ThreadMan_GetCurrentThread ( void );
71 extern void oC_ThreadMan_UnblockAllBlockedBy ( uint32_t * BlockingFlag , bool OnlyIfUnblocked );
72 extern void oC_ThreadMan_SwitchThread ( void );
73 extern oC_List(oC_Thread_t) oC_ThreadMan_GetList ( void );
74 extern oC_Thread_t oC_ThreadMan_GetThread ( const char * Name );
75 extern oC_MemorySize_t oC_ThreadMan_GetDefaultStackSize ( void );
76 extern oC_ErrorCode_t oC_ThreadMan_SetDefaultStackSize ( oC_MemorySize_t Size );
77 extern oC_ErrorCode_t oC_ThreadMan_SetAutoStackMethod ( oC_AutoStackMethod_t Type );
78 extern oC_AutoStackMethod_t oC_ThreadMan_GetAutoStackMethod ( void );
79 extern oC_ErrorCode_t oC_ThreadMan_SetRedZoneSize ( oC_MemorySize_t Size );
80 extern oC_MemorySize_t oC_ThreadMan_GetRedZoneSize ( void );
81 extern oC_ErrorCode_t oC_ThreadMan_SetStackIncreaseStep ( oC_MemorySize_t Size );
82 extern oC_MemorySize_t oC_ThreadMan_GetStackIncreaseStep ( void );
83 extern double oC_ThreadMan_GetCpuLoad ( void );
84 extern double oC_ThreadMan_GetCurrentCpuLoad ( void );
85 extern oC_Thread_t oC_ThreadMan_GetThreadOfContext ( void * Context );
86 
87 #undef _________________________________________FUNCTIONS_SECTION__________________________________________________________________________
88 
90 #endif /* INC_KERNEL_OC_THREADMAN_H_ */
The file with interface for the GPIO driver.
double oC_Frequency_t
type to store frequency
Definition: oc_frequency.h:76
The file with interface for thread managing.
The file with list library.
oC_SYS_LLD_Context_t * Context
!< Pointer to the real stack (real allocated memory)
Definition: oc_thread.c:69
const char * Name
!< Priority of this thread
Definition: oc_thread.c:65