Defines | |
#define | SIGNALED ((void *)-1) |
Signaled state definition. | |
#define | NUT_WAIT_INFINITE 0 |
Infinite waiting time definition. | |
#define | NutEventPostFromIrq(qp) |
Post an event to a specified queue from interrupt context. |
#define NUT_WAIT_INFINITE 0 |
#define NutEventPostFromIrq | ( | qp | ) |
Value:
{ \ if (*qp == 0) { \ *qp = SIGNALED; \ } \ else if (*qp != SIGNALED) { \ NUTTHREADINFO *tp = (NUTTHREADINFO *)(*qp); \ tp->td_qpec++; \ } \ }
Wake up the thread with the highest priority waiting on the specified queue. This function is explicitly provided for IRQ handlers to wakeup waiting user threads.
Internally a counter is used to keep track of the posted events. This counter will be examined when the currently running thread is ready to release the CPU.
qp | Identifies the queue an event is posted to. |
#define SIGNALED ((void *)-1) |
Signaled state definition.
The root of an event queue is set to this value if an event is posted to an empty queue. As this may happen during interrupts, the root of an event queue must be considered volatile.
Timer handles in the THREADINFO structure are set to this value if a timeout occured while waiting for an event.