|
AutosarOS
|
Operating system control. More...


Go to the source code of this file.
Functions | |
| void | OS_StartOS (AppModeType mode) |
| Start operating system. More... | |
| void | OS_ShutdownOS (StatusType error) |
| Shutdown operating system. More... | |
| void | OS_Schedule (void) |
| Schedule task. More... | |
| void | __attribute__ ((naked)) OS_ScheduleC(void) |
| Task switch. More... | |
| void | OS_Switch (void) |
| Switch to new task. More... | |
| void | OS_EnableAllInterrupts (void) |
| Enable all interrupts. More... | |
| void | OS_DisableAllInterrupts (void) |
| Disable all interrupts. More... | |
| void | OS_ResumeAllInterrupts (void) |
| Resume all interrupts. More... | |
| void | OS_SuspendAllInterrupts (void) |
| Suspend all interrupts. More... | |
| void | OS_ResumeOSInterrupts (void) |
| Resume OS interrupts. More... | |
| void | OS_SuspendOSInterrupts (void) |
| Suspend OS interrupts. More... | |
| AppModeType | OS_GetActiveApplicationMode (void) |
| Get currently active application mode. More... | |
| void | OS_ProtectionHookInternal (StatusType error) |
| Internal function for protection hook handling. More... | |
| void | OS_ShutdownOSStackOverrun (void) |
| Call OS_ShutdownOS() with E_OS_STACKFAULT. More... | |
| void | PreTaskHook (void) |
| PreTask hook function. More... | |
| void | PostTaskHook (void) |
| PostTask hook function. More... | |
| void | ErrorHook (StatusType error) |
| PostTask hook function. More... | |
| ProtectionReturnType | ProtectionHook (StatusType fatalError) |
| ProtectionHook function. More... | |
Operating system control.
Definition in file OS.h.
| void __attribute__ | ( | (naked) | ) |
Task switch.
This function performs the actual scheduling. It selects a new task to be executed and switches the current context accordingly. It should not be called directly and instead be used with OS_Schedule().
Definition at line 143 of file OS.c.

| void ErrorHook | ( | StatusType | error | ) |
|
inline |
Disable all interrupts.
This service disables all interrupts. It is the counterpart to OS_EnableAllInterrupts().
Nesting is not supported by this call.
Definition at line 256 of file OS.c.

|
inline |
Enable all interrupts.
This service enables all interrupts. It is the counterpart to OS_DisableAllInterrupts().
Nesting is not supported by this call.
Definition at line 251 of file OS.c.

| AppModeType OS_GetActiveApplicationMode | ( | void | ) |
| void OS_ProtectionHookInternal | ( | StatusType | error | ) |
Internal function for protection hook handling.
This function is called when a protection error is detected. It will call the configured protection hook if available and handle its return value.
| error | Type of error that triggered the protection hook |
Definition at line 310 of file OS.c.


| void OS_ResumeAllInterrupts | ( | void | ) |
Resume all interrupts.
This service resumes all interrupts disabled by the previous call to OS_SuspendAllInterrupts().
Nesting is supported by this call.
| void OS_ResumeOSInterrupts | ( | void | ) |
Resume OS interrupts.
This service resumes OS interrupts disabled by the privious call to OS_SuspendOSInterrupts().
Nesting is supported by this call.
| void OS_Schedule | ( | void | ) |
Schedule task.
This function calls OS_ScheduleC() unless scheduling is currently blocked. This is basically the entry point to the scheduler and should be called if scheduling is required or wanted.

| void OS_ShutdownOS | ( | StatusType | error | ) |
Shutdown operating system.
This service shuts down the operating system and does not return. If a ShutdownHook is configured it will be called before the system is terminated.
| error | Error occurred |
Definition at line 128 of file OS.c.


| void OS_ShutdownOSStackOverrun | ( | void | ) |
Call OS_ShutdownOS() with E_OS_STACKFAULT.
This function will simply call OS_ShutdownOS() with E_OS_STACKFAULT. This is mainly used to simplify the function call from the the sysTick timer ISR.
Definition at line 391 of file OS.c.

| void OS_StartOS | ( | AppModeType | mode | ) |
Start operating system.
This service starts the operating system in the specified application mode. The default application mode is OSDEFAULTAPPMODE.
| mode | Application mode |
Definition at line 91 of file OS.c.


| void OS_SuspendAllInterrupts | ( | void | ) |
Suspend all interrupts.
This service suspends all interrupts. It is the counterpart to OS_ResumeAllInterrupts().
Nesting is supported by this call
| void OS_SuspendOSInterrupts | ( | void | ) |
Suspend OS interrupts.
This service suspends all OS interrupts. It is the counterpart to OS_ResumeOSInterrupts().
Nesting is supported by this call.
| void OS_Switch | ( | void | ) |
| void PostTaskHook | ( | void | ) |
PostTask hook function.
This hook function is called before a task leaves the running state but before a new task is selected. The ID of the task can be evaluated using OS_GetTaskID().
Definition at line 776 of file App.c.

| void PreTaskHook | ( | void | ) |
PreTask hook function.
This hook function is called after a new task has entered the running state but before it is executed. The ID of the task can be evaluated using OS_GetTaskID().
Definition at line 768 of file App.c.

| ProtectionReturnType ProtectionHook | ( | StatusType | fatalError | ) |
ProtectionHook function.
This hook function is called when an error is detected by the protection facilities (e.g. stack monitoring).
| fatalError | Type of error that triggered the protection hook |
Definition at line 797 of file App.c.
