AutosarOS
OCB.h File Reference

Operating System Control Block. More...

#include <stddef.h>
#include <stdint.h>
#include <stdbool.h>
#include "Types.h"
#include <avr/io.h>
#include <util/delay.h>
#include "AppCfg.h"
Include dependency graph for OCB.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define OS_CONFIG_GEN_FUNC_DECL
 
#define OS_EXTENDED   false
 

Variables

volatile bool isISR
 Is currently ISR context? More...
 
volatile uint8_t isCat2ISR
 Priority of current Cat 2 ISR (zero if not in Cat 2 ISR) More...
 
volatile TaskType currentTask
 Task currently being executed. More...
 
volatile struct task_sTCB_Cfg []
 Current task control blocks. More...
 
volatile uint32_t sysTick
 Current system tick. More...
 
volatile uint8_t needScheduling
 Scheduling needed during timer interrupt. More...
 
volatile uint8_t blockScheduling
 Block scheduling. More...
 
bool forceScheduling
 Force the next rescheduling. More...
 
volatile uint8_t needSysTickEval
 SysTick must be evaluated during timer interrupt. More...
 
uint8_t OS_SystemStack []
 Array used as SystemStack (value points to stack top) More...
 
uint8_t *const OS_SystemStackPtr
 Pointer to SystemStack base. More...
 
volatile struct resource_sRes_Cfg []
 Current resource control blocks. More...
 
struct resource_s *volatile isrResourceQueue
 Resource queue for resources taken by Cat2 ISRs. More...
 
volatile struct internalResource_s IntResourceNULL_s
 Internal resource for tasks with no internal resource defined. More...
 
volatile struct counter_sCounter_Cfg []
 Current counter control blocks. More...
 
volatile struct alarm_sAlarm_Cfg []
 Current alarm control blocks. More...
 
struct scheduleTable_sScheduleTable_Cfg []
 Current schedule table control blocks. More...
 

Detailed Description

Operating System Control Block.

This contains the operating system control blocks generated during compilation.

Date
2019-09-02
Author
Pascal Romahn

Definition in file OCB.h.

Macro Definition Documentation

◆ OS_CONFIG_GEN_FUNC_DECL

#define OS_CONFIG_GEN_FUNC_DECL

Definition at line 31 of file OCB.h.

◆ OS_EXTENDED

#define OS_EXTENDED   false

Definition at line 156 of file OCB.h.

Variable Documentation

◆ Alarm_Cfg

volatile struct alarm_s* Alarm_Cfg[]
extern

Current alarm control blocks.

◆ blockScheduling

volatile uint8_t blockScheduling
extern

Block scheduling.

While set to a value different from zero all scheduling will be blocked.

Definition at line 27 of file OCB.c.

◆ Counter_Cfg

volatile struct counter_s* Counter_Cfg[]
extern

Current counter control blocks.

◆ currentTask

volatile TaskType currentTask
extern

Task currently being executed.

Definition at line 23 of file OCB.c.

◆ forceScheduling

bool forceScheduling
extern

Force the next rescheduling.

If set to true the next call of OS_Schedule() will perform a rescheduling even if current task is marked as non-preemptive.

This should only be set immediately before OS_Schedule() is called.

Definition at line 28 of file OCB.c.

◆ IntResourceNULL_s

volatile struct internalResource_s IntResourceNULL_s
extern

Internal resource for tasks with no internal resource defined.

◆ isCat2ISR

volatile uint8_t isCat2ISR
extern

Priority of current Cat 2 ISR (zero if not in Cat 2 ISR)

Definition at line 21 of file OCB.c.

◆ isISR

volatile bool isISR
extern

Is currently ISR context?

Definition at line 20 of file OCB.c.

◆ isrResourceQueue

struct resource_s* volatile isrResourceQueue
extern

Resource queue for resources taken by Cat2 ISRs.

Definition at line 32 of file OCB.c.

◆ needScheduling

volatile uint8_t needScheduling
extern

Scheduling needed during timer interrupt.

If set to 0 the system timer will not trigger rescheduling.

Definition at line 26 of file OCB.c.

◆ needSysTickEval

volatile uint8_t needSysTickEval
extern

SysTick must be evaluated during timer interrupt.

This indicates whether or not the change in SysTick value must be evaluated during the timer ISR. The value should be zero if no subsystem (like alarms) require evaluation of the sysTick counter.

Definition at line 30 of file OCB.c.

◆ OS_SystemStack

uint8_t OS_SystemStack[]
extern

Array used as SystemStack (value points to stack top)

◆ OS_SystemStackPtr

uint8_t* const OS_SystemStackPtr
extern

Pointer to SystemStack base.

◆ Res_Cfg

volatile struct resource_s* Res_Cfg[]
extern

Current resource control blocks.

◆ ScheduleTable_Cfg

struct scheduleTable_s* ScheduleTable_Cfg[]
extern

Current schedule table control blocks.

◆ sysTick

volatile uint32_t sysTick
extern

Current system tick.

Definition at line 25 of file OCB.c.

◆ TCB_Cfg

volatile struct task_s* TCB_Cfg[]
extern

Current task control blocks.