PR 641/rtems
	* src/eventsurrender.c: The problem here is that events may be lost
	when sent to a task which enters rtems_event_receive() with options
	set to wait with a timeout and to return on receipt of any event. The
	events are sent from an interrupt source such as a timer service
	routine. If more than one set of events is sent to the task before it
	returns, the first event set may be overwritten.
This commit is contained in:
Joel Sherrill
2004-07-24 17:52:40 +00:00
parent 8c829996c3
commit 0ca88a1dd4
2 changed files with 11 additions and 0 deletions

View File

@@ -1,3 +1,13 @@
2004-07-24 Mick Davis <mickd@microsol.iinet.net.au>
PR 641/rtems
* src/eventsurrender.c: The problem here is that events may be lost
when sent to a task which enters rtems_event_receive() with options
set to wait with a timeout and to return on receipt of any event. The
events are sent from an interrupt source such as a timer service
routine. If more than one set of events is sent to the task before it
returns, the first event set may be overwritten.
2004-07-24 Joel Sherrill <joel@OARcorp.com> 2004-07-24 Joel Sherrill <joel@OARcorp.com>
PR 652/rtems PR 652/rtems

View File

@@ -96,6 +96,7 @@ void _Event_Surrender(
if ( seized_events == event_condition || _Options_Is_any(option_set) ) { if ( seized_events == event_condition || _Options_Is_any(option_set) ) {
api->pending_events = api->pending_events =
_Event_sets_Clear( pending_events,seized_events ); _Event_sets_Clear( pending_events,seized_events );
(rtems_event_set) the_thread->Wait.count = 0;
*(rtems_event_set *)the_thread->Wait.return_argument = seized_events; *(rtems_event_set *)the_thread->Wait.return_argument = seized_events;
_Event_Sync_state = EVENT_SYNC_SATISFIED; _Event_Sync_state = EVENT_SYNC_SATISFIED;
} }