QP/C
Functions
qeq_lifo.c File Reference

QEQueue_postLIFO() definition. NOTE: this function is used for the "raw" thread-safe queues and NOT for the queues of active objects. More...

#include "qf_pkg.h"
#include "qassert.h"

Go to the source code of this file.

Functions

void QEQueue_postLIFO (QEQueue *me, QEvent const *e)
 "raw" thread-safe QF event queue implementation for the Last-In-First-Out (LIFO) event posting.

Detailed Description

QEQueue_postLIFO() definition. NOTE: this function is used for the "raw" thread-safe queues and NOT for the queues of active objects.

Definition in file qeq_lifo.c.


Function Documentation

void QEQueue_postLIFO ( QEQueue me,
QEvent const *  e 
)

"raw" thread-safe QF event queue implementation for the Last-In-First-Out (LIFO) event posting.

Note:
The LIFO policy should be used only with great caution because it alters order of events in the queue.
The function raises an assertion if the native QF queue becomes full and cannot accept the event. You can call this function from any task context or ISR context. Please note that this function uses internally a critical section.
See also:
QEQueue_postFIFO(), QEQueue_get()

Definition at line 41 of file qeq_lifo.c.

References Q_ASSERT, QF_EVT_POOL_ID_, QF_EVT_REF_CTR_, QF_EVT_REF_CTR_INC_, QF_PTR_AT_, QS_BEGIN_NOCRIT_, QS_END_NOCRIT_, QS_EQC_, QS_eqObj_, QS_OBJ_, QS_QF_EQUEUE_POST_LIFO, QS_TIME_, and QS_U8_.