RTEMS Event Receive Issue
Angelo Fraietta
angelo_f at bigpond.com
Fri Feb 7 23:19:22 UTC 2003
Mike Siers wrote:
>Hi,
>Is it the resposibility of the calling task to clear
>the event output variable before calling the function
>rtems_event_receive()? I do not see any code that
>resets the output value. So if I call the function
>with a timeout and there are no events, my output
>value will be the same as the last time.
>
When you say output variable do you mean that the event flags?
I think the event status should not be changed by an unsuccesful call to
rtems_event_receive
Or do you mean that the event set should be cleared before waiting for
the event?
Either way, I don't belive it should be a part of the event mechanism
because an event might be set by an ISR before waiting for the event.
If I was to go into a wait event, I would want it to return if the event
was received before I waited for it.
>
>So can we add code to clear the output value? If not,
>then there is a bug in the network task since the
>output event flag is not being cleared.
>
>
>Any thoughts?
>
If you require the event to be cleard before waiting for it, I belive
that it should be done in the task / driver -- not the event.
>
>Mike Siers
>Poliac Research
>
>
--
Angelo Fraietta
PO Box 859
Hamilton NSW 2303
Home Page
http://www.users.bigpond.com/angelo_f/
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