Sample QP/C port. More...
#include <stdint.h>
#include <stdbool.h>
#include "qequeue.h"
#include "qmpool.h"
#include "qp.h"
#include "qk.h"
Go to the source code of this file.
Macros | |
#define | Q_NORETURN _Noreturn void |
No-return specifier for the Q_onError() callback function. | |
#define | QACTIVE_EQUEUE_TYPE QEQueue |
QActive event queue type used in various QP/C ports. | |
#define | QACTIVE_OS_OBJ_TYPE void* |
QActive "OS-object" type used in various QP/C ports. | |
#define | QACTIVE_THREAD_TYPE void const * |
QActive "thread" type used in various QP/C ports. | |
#define | QF_INT_DISABLE() |
Disable interrupts. | |
#define | QF_INT_ENABLE() |
Enable interrupts. | |
#define | QF_CRIT_STAT crit_stat_t crit_stat_; |
#define | QF_CRIT_ENTRY() |
#define | QF_CRIT_EXIT() |
#define | QV_CPU_SLEEP() |
! def QF_MEM_ISOLATE | |
#define | QK_ISR_CONTEXT_() |
#define | QK_ISR_ENTRY() |
#define | QK_ISR_EXIT() |
#define | QXK_ISR_CONTEXT_() |
Check if the code executes in the ISR context. | |
#define | QXK_CONTEXT_SWITCH_() |
Trigger context switch (used internally in QXK only) | |
#define | QXK_ISR_ENTRY() |
Define the ISR entry sequence. | |
#define | QXK_ISR_EXIT() |
Define the ISR exit sequence. | |
Typedefs | |
typedef unsigned int | crit_stat_t |
Functions | |
crit_stat_t | critEntry (void) |
void | critExit (crit_stat_t stat) |
Sample QP/C port.
This is just an example of a QF port for a generic C99 compiler. Other specific QF ports will define the QF facilities differently.
Definition in file qp_port.h.
#define Q_NORETURN _Noreturn void |
No-return specifier for the Q_onError() callback function.
If the Q_NORETURN
macro is undefined, the default definition uses the C99 specifier _Noreturn
.
Q_NORETURN
macro can be defined in the QP port (typically in qep_port.h
). If such definition is provided the default won't be used. #define QACTIVE_EQUEUE_TYPE QEQueue |
#define QACTIVE_OS_OBJ_TYPE void* |
#define QACTIVE_THREAD_TYPE void const * |
#define QF_INT_DISABLE | ( | ) |
#define QF_INT_ENABLE | ( | ) |
#define QF_CRIT_STAT crit_stat_t crit_stat_; |
Define the critical section status that was present before entering the critical section.
For critical sections that are allowed to nest, the critical section status must be saved and restored at the end. This macro provides the storage for saving the status.
#define QF_CRIT_ENTRY | ( | ) |
Enter the critical section
If the critical section status is provided, the macro saves the critical section status from before entering the critical section. Otherwise, the macro just unconditionally enters the critical section without saving the status.
#define QF_CRIT_EXIT | ( | ) |
Exit the critical section
If the critical section status is provided, the macro restores the critical section status saved by QF_CRIT_ENTRY(). Otherwise, the macro just unconditionally exits the critical section.
#define QV_CPU_SLEEP | ( | ) |
#define QK_ISR_CONTEXT_ | ( | ) |
#define QK_ISR_ENTRY | ( | ) |
#define QK_ISR_EXIT | ( | ) |
#define QXK_ISR_CONTEXT_ | ( | ) |
#define QXK_CONTEXT_SWITCH_ | ( | ) |
#define QXK_ISR_ENTRY | ( | ) |
#define QXK_ISR_EXIT | ( | ) |
Define the ISR exit sequence.
typedef unsigned int crit_stat_t |
crit_stat_t critEntry | ( | void | ) |
void critExit | ( | crit_stat_t | stat | ) |