Main Page   Modules   Data Structures   File List   Data Fields   Globals   Related Pages   Examples  

XgEvent


Functions

void NutEventTimeout (HANDLE timer, void *arg)
 Timer callback in case of event timeout.

int NutEventWait (volatile HANDLE *qhp, u_long ms)
 Wait for an event in a specified queue.

int NutEventWaitNext (volatile HANDLE *qhp, u_long ms)
 Wait for a new event in a specified queue.

void NutEventPostAsync (HANDLE volatile *qhp)
 Asynchronously post an event to a specified queue.

void NutEventPost (HANDLE *qhp)
 Post an event to a specified queue.

void NutEventBroadcastAsync (HANDLE *qhp)
 Asynchronously broadcast an event to a specified queue.

void NutEventBroadcast (HANDLE *qhp)
 Broadcast an event to a specified queue.


Function Documentation

void NutEventBroadcast HANDLE   qhp
 

Broadcast an event to a specified queue.

Wake up all threads waiting on this queue. If the priority of any waiting thread is higher or equal than the current thread's priority, then the current thread is stopped and CPU control is passed to the woken up thread with the highest priority.

Parameters:
qhp  Identifies the queue an event is broadcasted to.

void NutEventBroadcastAsync HANDLE   qhp
 

Asynchronously broadcast an event to a specified queue.

Wake up all threads waiting on this queue. But even if the priority of any woken thread is higher than the current thread's priority, the current one continues running.

Note:
It is save to call this function from within an interrupt handler. In any case interrupts must be disabled when calling this function.
Parameters:
qhp  Identifies the queue an event is broadcasted to.

void NutEventPost HANDLE   qhp
 

Post an event to a specified queue.

Wake up the thread with the highest priority waiting on this queue. If the priority of the waiting thread is higher or equal than the current thread's priority, then the current thread is stopped and CPU control is passed to the waiting thread.

Parameters:
qhp  Identifies the queue an event is posted to.

void NutEventPostAsync HANDLE volatile *    qhp
 

Asynchronously post an event to a specified queue.

Wake up the thread with the highest priority waiting on the specified queue. But even if the priority of the woken thread is higher than the current thread's priority, the current one continues running.

Note:
It is save to call this function from within an interrupt handler. In any case interrupts should be disabled when calling this function.
Parameters:
qhp  Identifies the queue an event is posted to.

void NutEventTimeout HANDLE    timer,
void *    arg
 

Timer callback in case of event timeout.

Parameters:
timer  Handle of the elapsed timeout timer.
arg  Handle of an event queue.
Note:
This routine is running in interrupt context.

int NutEventWait volatile HANDLE   qhp,
u_long    ms
 

Wait for an event in a specified queue.

Give up the CPU until another thread posts an event to this queue or until a time-out occurs, whichever comes first. If previously an event had been posted to this queue without any thread waiting, then the thread will continue running, if no other thread with higher priority is ready to run.

Parameters:
qhp  Identifies the queue to wait on.
ms  Maximum wait time in milliseconds.
Returns:
0 if event received, -1 on timeout.
Note:
Timeout is limited to the granularity of the system timer.

int NutEventWaitNext volatile HANDLE   qhp,
u_long    ms
 

Wait for a new event in a specified queue.

Give up the CPU until another thread posts an event to this queue or until a time-out occurs, whichever comes first. Previously posted events to an empty queue will be ignored.

Parameters:
qhp  Identifies the queue to wait on.
ms  Maximum wait time in milliseconds.
Returns:
0 if event received, -1 on timeout.
Note:
Timeout is limited to the granularity of the system timer.


Generated on Thu Jan 30 22:30:59 2003 for EduNet by doxygen1.2.18