diff options
author | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2013-06-05 11:48:28 +0200 |
---|---|---|
committer | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2013-06-07 17:06:38 +0200 |
commit | 54e9216a0e646113a7e2f23a436731c0cf0fba62 (patch) | |
tree | cc3c89a7516ecdd19513aedb1766ac80a2440bcb /cpukit/score/src | |
parent | score: Align _Objects_Get_isr_disable() (diff) | |
download | rtems-54e9216a0e646113a7e2f23a436731c0cf0fba62.tar.bz2 |
score: Add _Objects_Put_for_get_isr_disable()
Provide SMP support. The ISR disable/enable is not enough to ensure
mutual exclusion for SMP configurations.
Diffstat (limited to 'cpukit/score/src')
-rw-r--r-- | cpukit/score/src/objectgetisr.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/cpukit/score/src/objectgetisr.c b/cpukit/score/src/objectgetisr.c index 9eeee3cc71..56f74715e1 100644 --- a/cpukit/score/src/objectgetisr.c +++ b/cpukit/score/src/objectgetisr.c @@ -44,6 +44,9 @@ Objects_Control *_Objects_Get_isr_disable( index = id - information->minimum_id + 1; if ( information->maximum >= index ) { +#if defined(RTEMS_SMP) + _Thread_Disable_dispatch(); +#endif _ISR_Disable( level ); if ( (the_object = information->local_table[ index ]) != NULL ) { *location = OBJECTS_LOCAL; @@ -51,6 +54,9 @@ Objects_Control *_Objects_Get_isr_disable( return the_object; } _ISR_Enable( level ); +#if defined(RTEMS_SMP) + _Thread_Enable_dispatch(); +#endif *location = OBJECTS_ERROR; return NULL; } |