CHERIoT RTOS
A compartmentalised RTOS for CHERIoT hardware
Loading...
Searching...
No Matches
event_groups.h File Reference

FreeRTOS event-group compatibility APIs. More...

#include "FreeRTOS.h"
#include <event.h>
#include <stdint.h>
#include <stdlib.h>

Go to the source code of this file.

Typedefs

typedef uint32_t EventBits_t
 Type for bits in an event group.
typedef struct EventGroup * EventGroupHandle_t
 Type for event group handles.

Functions

static EventGroupHandle_t xEventGroupCreate (void)
 Create a new event group on the heap.
static EventBits_t xEventGroupSetBits (EventGroupHandle_t xEventGroup, const EventBits_t uxBitsToSet)
 Set bits in an event group.
static EventBits_t xEventGroupWaitBits (EventGroupHandle_t xEventGroup, const EventBits_t uxBitsToWaitFor, const BaseType_t xClearOnExit, const BaseType_t xWaitForAllBits, TickType_t xTicksToWait)
 Wait for bits in an event group to be set.
static void vEventGroupDelete (EventGroupHandle_t xEventGroup)
 Delete an event group.

Detailed Description

FreeRTOS event-group compatibility APIs.

This file defines the compatibility wrappers for FreeRTOS's event groups. This is intended for porting code from FreeRTOS and should not be used in new CHERIoT software. The functions in this file wrap the APIs exposed in event.h. These are implemented in the event_group shared library, which must be linked to the final firmware image.

Definition in file event_groups.h.

Typedef Documentation

◆ EventBits_t

typedef uint32_t EventBits_t

Type for bits in an event group.

Definition at line 21 of file event_groups.h.

◆ EventGroupHandle_t

typedef struct EventGroup* EventGroupHandle_t

Type for event group handles.

Definition at line 26 of file event_groups.h.

Function Documentation

◆ vEventGroupDelete()

void vEventGroupDelete ( EventGroupHandle_t xEventGroup)
inlinestatic

Delete an event group.

Definition at line 84 of file event_groups.h.

References eventgroup_destroy().

◆ xEventGroupCreate()

EventGroupHandle_t xEventGroupCreate ( void )
inlinestatic

Create a new event group on the heap.

Returns NULL on allocation failure.

Definition at line 31 of file event_groups.h.

References eventgroup_create(), and UnlimitedTimeout.

◆ xEventGroupSetBits()

EventBits_t xEventGroupSetBits ( EventGroupHandle_t xEventGroup,
const EventBits_t uxBitsToSet )
inlinestatic

Set bits in an event group.

Returns the new value of the event group after this call. If the timeout expires, the new bits may not have been set.

Definition at line 48 of file event_groups.h.

References eventgroup_set(), and UnlimitedTimeout.

◆ xEventGroupWaitBits()

EventBits_t xEventGroupWaitBits ( EventGroupHandle_t xEventGroup,
const EventBits_t uxBitsToWaitFor,
const BaseType_t xClearOnExit,
const BaseType_t xWaitForAllBits,
TickType_t xTicksToWait )
inlinestatic

Wait for bits in an event group to be set.

Returns the new value of the bits that are currently set. Blocks until either the timeout expires or some or all uxBitsToWaitFor are set, depending on the value of xWaitForAllBits. If xClearOnExit is true, the bits that were set are cleared before returning.

Definition at line 64 of file event_groups.h.

References eventgroup_wait().