AutosarOS
OS.h
Go to the documentation of this file.
1 
15 #ifndef OS_H_
16 #define OS_H_
17 
18 #include "Types.h"
19 #include "OCB.h"
20 
21 #include <stdbool.h>
22 
36 extern void OS_StartOS(AppModeType mode);
37 
46 extern void OS_ShutdownOS(StatusType error);
47 
54 extern void OS_Schedule(void);
55 
63 extern void __attribute__((naked)) OS_ScheduleC(void);
64 
71 extern void OS_Switch(void);
72 
80 extern void OS_EnableAllInterrupts(void);
81 
89 extern void OS_DisableAllInterrupts(void);
90 
98 extern void OS_ResumeAllInterrupts(void);
99 
107 extern void OS_SuspendAllInterrupts(void);
108 
121 extern void OS_ResumeOSInterrupts(void);
122 
135 extern void OS_SuspendOSInterrupts(void);
136 
143 
152 extern void OS_ProtectionHookInternal(StatusType error);
153 
160 extern void OS_ShutdownOSStackOverrun(void);
161 
162 #if defined(OS_CONFIG_HOOK_STARTUP) && OS_CONFIG_HOOK_STARTUP == true
163 
170 extern void StartupHook(void);
171 #endif
172 
173 #if defined(OS_CONFIG_HOOK_SHUTDOWN) && OS_CONFIG_HOOK_SHUTDOWN == true
174 
183 extern void ShutdownHook(StatusType error);
184 #endif
185 
186 #if (defined(OS_CONFIG_HOOK_PRE_TASK) && OS_CONFIG_HOOK_PRE_TASK == true) || defined(__DOXYGEN__)
187 
195 extern void PreTaskHook(void);
196 #endif
197 
198 #if (defined(OS_CONFIG_HOOK_POST_TASK) && OS_CONFIG_HOOK_POST_TASK == true) || defined(__DOXYGEN__)
199 
207 extern void PostTaskHook(void);
208 #endif
209 
210 #if (defined(OS_CONFIG_HOOK_ERROR) && OS_CONFIG_HOOK_ERROR == true) || defined(__DOXYGEN__)
211 
220 extern void ErrorHook(StatusType error);
221 #endif
222 
223 #if (defined(OS_CONFIG_HOOK_PROTECTION) && OS_CONFIG_HOOK_PROTECTION == true) || defined(__DOXYGEN__)
224 
237 #endif
238 
239 #endif /* OS_H_ */
OS_EnableAllInterrupts
void OS_EnableAllInterrupts(void)
Enable all interrupts.
Definition: OS.c:251
OS_Switch
void OS_Switch(void)
Switch to new task.
Definition: OS.c:233
ProtectionReturnType
enum ProtectionReturnType_e ProtectionReturnType
Return type for protection hook.
StatusType
enum StatusType_e StatusType
Type for status.
OS_ShutdownOS
void OS_ShutdownOS(StatusType error)
Shutdown operating system.
Definition: OS.c:128
OS_ProtectionHookInternal
void OS_ProtectionHookInternal(StatusType error)
Internal function for protection hook handling.
Definition: OS.c:310
OS_GetActiveApplicationMode
AppModeType OS_GetActiveApplicationMode(void)
Get currently active application mode.
Definition: OS.c:303
ProtectionHook
ProtectionReturnType ProtectionHook(StatusType fatalError)
ProtectionHook function.
Definition: App.c:797
StartupHook
void StartupHook(void)
Definition: App.c:702
PostTaskHook
void PostTaskHook(void)
PostTask hook function.
Definition: App.c:776
OS_StartOS
void OS_StartOS(AppModeType mode)
Start operating system.
Definition: OS.c:91
OS_Schedule
void OS_Schedule(void)
Schedule task.
OS_SuspendAllInterrupts
void OS_SuspendAllInterrupts(void)
Suspend all interrupts.
Definition: OS.c:273
__attribute__
void __attribute__((naked)) OS_ScheduleC(void)
Task switch.
Definition: OS.c:143
ErrorHook
void ErrorHook(StatusType error)
PostTask hook function.
Definition: App.c:784
PreTaskHook
void PreTaskHook(void)
PreTask hook function.
Definition: App.c:768
OS_ResumeOSInterrupts
void OS_ResumeOSInterrupts(void)
Resume OS interrupts.
Definition: OS.c:282
Types.h
Type definitions.
OS_SuspendOSInterrupts
void OS_SuspendOSInterrupts(void)
Suspend OS interrupts.
Definition: OS.c:294
ShutdownHook
void ShutdownHook(StatusType error)
Definition: App.c:757
OCB.h
Operating System Control Block.
OS_ResumeAllInterrupts
void OS_ResumeAllInterrupts(void)
Resume all interrupts.
Definition: OS.c:261
OS_DisableAllInterrupts
void OS_DisableAllInterrupts(void)
Disable all interrupts.
Definition: OS.c:256
OS_ShutdownOSStackOverrun
void OS_ShutdownOSStackOverrun(void)
Call OS_ShutdownOS() with E_OS_STACKFAULT.
Definition: OS.c:391
AppModeType
enum applicationMode_e AppModeType
Type for application mode.