AutosarOS
OCB.c
Go to the documentation of this file.
1 
14 #include "OCB.h"
15 #include "OS.h"
16 #include "context.h"
17 #include "assert.h"
18 #include <avr/interrupt.h>
19 
20 volatile bool isISR = false;
21 volatile uint8_t isCat2ISR;
22 
23 volatile TaskType currentTask = INVALID_TASK;
24 
25 volatile uint32_t sysTick;
26 volatile uint8_t needScheduling;
27 volatile uint8_t blockScheduling;
29 
30 volatile uint8_t needSysTickEval;
31 
32 struct resource_s* volatile isrResourceQueue = NULL;
33 
34 #if (defined(OS_CONFIG_HOOK_ERROR) && OS_CONFIG_HOOK_ERROR == true)
35 volatile bool blockErrorHook;
36 #endif /* (defined(OS_CONFIG_HOOK_ERROR) && OS_CONFIG_HOOK_ERROR == true) */
37 
38 #if defined(OS_CONFIG_MAX_ERROR_PARAM) && OS_CONFIG_MAX_ERROR_PARAM >= 0
39 volatile struct errorInfo_s errorInfo;
40 #endif /* defined(OS_CONFIG_MAX_ERROR_PARAM) && OS_CONFIG_MAX_ERROR_PARAM >= 0 */
41 
42 #define OS_CONFIG_GEN_DATA_STRUCT
43 #include "AppCfg.h"
44 #undef OS_CONFIG_GEN_DATA_STRUCT
45 
46 #define OS_CONFIG_GEN_TCB
47 #include "AppCfg.h"
48 #undef OS_CONFIG_GEN_TCB
49 
50 #define OS_CONFIG_GEN_FUNC
51 #include "AppCfg.h"
52 #undef OS_CONFIG_GEN_FUNC
isrResourceQueue
struct resource_s *volatile isrResourceQueue
Resource queue for resources taken by Cat2 ISRs.
Definition: OCB.c:32
forceScheduling
bool forceScheduling
Force the next rescheduling.
Definition: OCB.c:28
TaskType
enum tasks_e TaskType
Type for task reference.
Definition: TaskTypes.h:29
OS.h
Operating system control.
blockScheduling
volatile uint8_t blockScheduling
Block scheduling.
Definition: OCB.c:27
currentTask
volatile TaskType currentTask
Task currently being executed.
Definition: OCB.c:23
assert.h
Assert macros and functions.
sysTick
volatile uint32_t sysTick
Current system tick.
Definition: OCB.c:25
isCat2ISR
volatile uint8_t isCat2ISR
Priority of current Cat 2 ISR (zero if not in Cat 2 ISR)
Definition: OCB.c:21
needSysTickEval
volatile uint8_t needSysTickEval
SysTick must be evaluated during timer interrupt.
Definition: OCB.c:30
resource_s
Data structure for OS resource.
Definition: ResourceTypes.h:29
errorInfo_s
Structure used for saving error information.
Definition: ErrorTypes.h:63
isISR
volatile bool isISR
Is currently ISR context?
Definition: OCB.c:20
needScheduling
volatile uint8_t needScheduling
Scheduling needed during timer interrupt.
Definition: OCB.c:26
context.h
Context switching.
OCB.h
Operating System Control Block.