QXK/C (preemptive dual-mode kernel) platform-independent public interface.
More...
#include "qequeue.h"
#include "qmpool.h"
#include "qpset.h"
Go to the source code of this file.
|
#define | QF_EQUEUE_TYPE QEQueue |
|
#define | QF_OS_OBJECT_TYPE void* |
|
#define | QF_THREAD_TYPE void* |
|
#define | QXK_TLS(type_) ((type_)QXK_current()->thread) |
|
#define | QXK_ISR_CONTEXT_() (QXK_attr_.intNest != 0U) |
|
#define | QF_SCHED_STAT_ QSchedStatus lockStat_; |
|
#define | QF_SCHED_LOCK_(prio_) |
|
#define | QF_SCHED_UNLOCK_() |
|
#define | QACTIVE_EQUEUE_WAIT_(me_) (Q_ASSERT_ID(110, (me_)->eQueue.frontEvt != (QEvt *)0)) |
|
#define | QACTIVE_EQUEUE_SIGNAL_(me_) |
|
#define | QF_EPOOL_TYPE_ QMPool |
|
#define | QF_EPOOL_INIT_(p_, poolSto_, poolSize_, evtSize_) (QMPool_init(&(p_), (poolSto_), (poolSize_), (evtSize_))) |
|
#define | QF_EPOOL_EVENT_SIZE_(p_) ((uint_fast16_t)(p_).blockSize) |
|
#define | QF_EPOOL_GET_(p_, e_, m_, qs_id_) ((e_) = (QEvt *)QMPool_get(&(p_), (m_), (qs_id_))) |
|
#define | QF_EPOOL_PUT_(p_, e_, qs_id_) (QMPool_put(&(p_), (e_), (qs_id_))) |
|
- Date
- Last updated on: 2022-06-14
- Version
- Last updated for: Version 7.0.1, 2022-06-30 (planned)
Definition in file qxk.h.
◆ QF_EQUEUE_TYPE
Definition at line 44 of file qxk.h.
◆ QF_OS_OBJECT_TYPE
#define QF_OS_OBJECT_TYPE void* |
Definition at line 49 of file qxk.h.
◆ QF_THREAD_TYPE
#define QF_THREAD_TYPE void* |
Definition at line 52 of file qxk.h.
◆ QXK_TLS
#define QXK_TLS |
( |
|
type_ | ) |
((type_)QXK_current()->thread) |
Access Thread-Local Storage (TLS) and cast it on the given type_
Definition at line 55 of file qxk.h.
◆ QXK_ISR_CONTEXT_
#define QXK_ISR_CONTEXT_ |
( |
| ) |
(QXK_attr_.intNest != 0U) |
Internal macro that reports the execution context (ISR vs. thread)
- Returns
- true if the code executes in the ISR context and false otherwise
Definition at line 234 of file qxk.h.
◆ QF_SCHED_STAT_
Internal macro to represent the scheduler lock status that needs to be preserved to allow nesting of locks.
Definition at line 241 of file qxk.h.
◆ QF_SCHED_LOCK_
#define QF_SCHED_LOCK_ |
( |
|
prio_ | ) |
|
Value: do { \
lockStat_ = 0xFFU; \
} else { \
} \
} while (false)
#define QXK_ISR_CONTEXT_()
QSchedStatus QXK_schedLock(uint_fast8_t ceiling)
Internal macro for selective scheduler locking.
Definition at line 244 of file qxk.h.
◆ QF_SCHED_UNLOCK_
#define QF_SCHED_UNLOCK_ |
( |
| ) |
|
Value: do { \
if (lockStat_ != 0xFFU) { \
QXK_schedUnlock(lockStat_); \
} \
} while (false)
Internal macro for selective scheduler unlocking.
Definition at line 253 of file qxk.h.
◆ QACTIVE_EQUEUE_WAIT_
#define QACTIVE_EQUEUE_WAIT_ |
( |
|
me_ | ) |
(Q_ASSERT_ID(110, (me_)->eQueue.frontEvt != (QEvt *)0)) |
◆ QACTIVE_EQUEUE_SIGNAL_
#define QACTIVE_EQUEUE_SIGNAL_ |
( |
|
me_ | ) |
|
Value: do { \
QXK_activate_(); \
} \
} \
} while (false)
uint_fast8_t QXK_sched_(void)
Definition at line 262 of file qxk.h.
◆ QF_EPOOL_TYPE_
◆ QF_EPOOL_INIT_
#define QF_EPOOL_INIT_ |
( |
|
p_, |
|
|
|
poolSto_, |
|
|
|
poolSize_, |
|
|
|
evtSize_ |
|
) |
| (QMPool_init(&(p_), (poolSto_), (poolSize_), (evtSize_))) |
◆ QF_EPOOL_EVENT_SIZE_
#define QF_EPOOL_EVENT_SIZE_ |
( |
|
p_ | ) |
((uint_fast16_t)(p_).blockSize) |
◆ QF_EPOOL_GET_
#define QF_EPOOL_GET_ |
( |
|
p_, |
|
|
|
e_, |
|
|
|
m_, |
|
|
|
qs_id_ |
|
) |
| ((e_) = (QEvt *)QMPool_get(&(p_), (m_), (qs_id_))) |
◆ QF_EPOOL_PUT_
#define QF_EPOOL_PUT_ |
( |
|
p_, |
|
|
|
e_, |
|
|
|
qs_id_ |
|
) |
| (QMPool_put(&(p_), (e_), (qs_id_))) |
◆ QSchedStatus
The scheduler lock status
Definition at line 165 of file qxk.h.