diff options
author | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2014-02-19 11:21:34 +0100 |
---|---|---|
committer | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2014-03-06 09:43:58 +0100 |
commit | ba25cc208c5c83453a57cc42e402c55ac3ffe019 (patch) | |
tree | 65fb290fb28342134eb6ab860cfe4b07fa2261ed /cpukit/score/src/smp.c | |
parent | score: SMP initialization and shutdown changes (diff) | |
download | rtems-ba25cc208c5c83453a57cc42e402c55ac3ffe019.tar.bz2 |
score: Add and use _Giant_Drop()
New test smptests/smpfatal03.
Diffstat (limited to 'cpukit/score/src/smp.c')
-rw-r--r-- | cpukit/score/src/smp.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/cpukit/score/src/smp.c b/cpukit/score/src/smp.c index 0f632236b7..e56073d281 100644 --- a/cpukit/score/src/smp.c +++ b/cpukit/score/src/smp.c @@ -73,6 +73,14 @@ void _SMP_Request_shutdown( void ) Per_CPU_Control *self_cpu = _Per_CPU_Get_by_index( self ); _Per_CPU_State_change( self_cpu, PER_CPU_STATE_SHUTDOWN ); + + /* + * We have to drop the Giant lock here in order to give other processors the + * opportunity to receive the inter-processor interrupts issued previously. + * In case the executing thread still holds SMP locks, then other processors + * already waiting for this SMP lock will spin forever. + */ + _Giant_Drop( self ); } void _SMP_Send_message( uint32_t cpu, uint32_t message ) |