Go to the documentation of this file.
19 #include <util/atomic.h>
31 ATOMIC_BLOCK(ATOMIC_RESTORESTATE) {
59 while (*resPtr != NULL) {
60 resPtr = &(*resPtr)->
next;
87 ATOMIC_BLOCK(ATOMIC_RESTORESTATE) {
108 ceilingPrio = UINT8_MAX;
130 while ((*resPtr)->next != NULL) {
131 if (ceilingPrio < (*resPtr)->prio) {
132 ceilingPrio = (*resPtr)->prio;
135 resPtr = &(*resPtr)->
next;
188 if (*resPtr != NULL) {
189 while ((*resPtr)->next != NULL) {
190 if (ceilingPrio < (*resPtr)->prio) {
191 ceilingPrio = (*resPtr)->
prio;
194 resPtr = &(*resPtr)->
next;
uint8_t curPrio
Current priority.
enum StatusType_e StatusType
Type for status.
struct resource_s *volatile isrResourceQueue
Resource queue for resources taken by Cat2 ISRs.
volatile struct internalResource_s *const internalResource
Pointer to internal resource.
Operating system control.
#define RESOURCE_COUNT
Count of resources defined.
struct resource_s * resourceQueue
Current queue of allocated resources.
Assert macros and functions.
volatile struct internalResource_s IntResourceNULL_s
Internal resource for tasks with no internal resource defined.
volatile TaskType currentTask
Task currently being executed.
volatile struct resource_s * Res_Cfg[]
Current resource control blocks.
StatusType Resource_ReleaseResource(ResourceType ResID)
Release a resource.
#define OS_SET_ERROR_INFO1(serviceId, paramPtr1, size1)
Set error info with up to one parameter.
void Resource_GetInternalResource(void)
Get internal resource of the current task if one is assigned.
StatusType Resource_GetResource(ResourceType ResID)
Request a resource.
void OS_Schedule(void)
Schedule task.
volatile struct task_s * TCB_Cfg[]
Current task control blocks.
bool assigned
If true the resource is currently assigned to a task or ISR.
volatile uint8_t isCat2ISR
Priority of current Cat 2 ISR (zero if not in Cat 2 ISR)
const uint8_t prio
Ceiling priority of resource.
@ OSServiceId_ReleaseResource
#define assert(expression)
Data structure for OS resource.
const uint8_t prio
Static priority of the task.
@ OSServiceId_GetResource
void Resource_ReleaseInternalResource(void)
Release internal resource of the current task if one is assigned.
bool assigned
If true the resource is currently assigned to a task.
enum resources_e ResourceType
Type for resource reference.
struct resource_s * next
Pointer to next resource in resource queue.
#define OS_CALL_ERROR_HOOK(error)
Call error hook if configured.
const uint8_t prio
Ceiling priority of resource.