Event behaviour

Angelo Fraietta angelo_f at bigpond.com
Tue Apr 2 22:23:51 UTC 2002

I have a task that waits for an event, however, it is possible that the 
event has been set by an interrupt before the task begins to actually 
wait. The following snippet shows a task about to go into a wait with 
the event being set just before it waits.

while (1)
    rtems_event_set dummy;

    // >> event is set at this time by another thread of execution

    rtems_task_ident( RTEMS_SELF, RTEMS_SEARCH_ALL_NODES, &_task_id );

    rtems_event_receive (RTEMS_EVENT_EVENT_FLAG, RTEMS_WAIT,
                                             RTEMS_NO_TIMEOUT, &dummy);

The question is, should the event return in this case, or did the event 
have to be set after the receive call?

Angelo Fraietta

PO Box 859
Hamilton NSW 2303

Home Page


There are those who seek knowledge for the sake of knowledge - that is CURIOSITY
There are those who seek knowledge to be known by others - that is VANITY
There are those who seek knowledge in order to serve - that is LOVE
    Bernard of Clairvaux (1090 - 1153)

More information about the users mailing list