Make Post an atomic operation.

This commit is contained in:
Joel Sherrill
1997-10-06 21:28:40 +00:00
parent d14418b6cb
commit 7e4938ca42
6 changed files with 36 additions and 6 deletions

View File

@@ -48,7 +48,11 @@ RTEMS_INLINE_ROUTINE void _Event_sets_Post(
rtems_event_set *the_event_set
)
{
*the_event_set |= the_new_events;
ISR_Level level;
_ISR_Disable( level );
*the_event_set |= the_new_events;
_ISR_Enable( level );
}
/*PAGE

View File

@@ -48,7 +48,11 @@ RTEMS_INLINE_ROUTINE void _Event_sets_Post(
rtems_event_set *the_event_set
)
{
*the_event_set |= the_new_events;
ISR_Level level;
_ISR_Disable( level );
*the_event_set |= the_new_events;
_ISR_Enable( level );
}
/*PAGE

View File

@@ -31,7 +31,13 @@
*/
#define _Event_sets_Post( _the_new_events, _the_event_set ) \
*(_the_event_set) |= (_the_new_events)
do { \
ISR_Level level; \
\
_ISR_Disable( level ); \
*(_the_event_set) |= (_the_new_events); \
_ISR_Enable( level ); \
} while (0);
/*PAGE
*

View File

@@ -31,7 +31,13 @@
*/
#define _Event_sets_Post( _the_new_events, _the_event_set ) \
*(_the_event_set) |= (_the_new_events)
do { \
ISR_Level level; \
\
_ISR_Disable( level ); \
*(_the_event_set) |= (_the_new_events); \
_ISR_Enable( level ); \
} while (0);
/*PAGE
*