diff options
author | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2013-05-28 10:54:46 +0200 |
---|---|---|
committer | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2013-05-31 15:20:32 +0200 |
commit | e358088fc25fb3f62b30ae6a187f3e374f6a5ed7 (patch) | |
tree | 554337534e7212617c1523be0453c604ad120916 /cpukit/score/cpu/i386/rtems/score/cpu.h | |
parent | score: Mark as no return (diff) | |
download | rtems-e358088fc25fb3f62b30ae6a187f3e374f6a5ed7.tar.bz2 |
smp: New SMP lock API
Move the SMP lock implementation to the CPU port. An optimal SMP lock
implementation is highly architecture dependent. For example the memory
models may be fundamentally different.
The new SMP lock API has a flaw. It does not provide the ability to use
a local context for acquire and release pairs. Such a context is
necessary to implement for example the Mellor-Crummey and Scott (MCS)
locks. The SMP lock is currently used in _Thread_Disable_dispatch() and
_Thread_Enable_dispatch() and makes them to a giant lock acquire and
release. Since these functions do not pass state information via a
local context there is currently no use case for such a feature.
Diffstat (limited to '')
-rw-r--r-- | cpukit/score/cpu/i386/rtems/score/cpu.h | 9 |
1 files changed, 0 insertions, 9 deletions
diff --git a/cpukit/score/cpu/i386/rtems/score/cpu.h b/cpukit/score/cpu/i386/rtems/score/cpu.h index c262e3cf45..3f7a331c3f 100644 --- a/cpukit/score/cpu/i386/rtems/score/cpu.h +++ b/cpukit/score/cpu/i386/rtems/score/cpu.h @@ -455,15 +455,6 @@ uint32_t _CPU_ISR_Get_level( void ); #define _CPU_Context_switch_to_first_task_smp( _the_context ) \ _CPU_Context_restore( (_the_context) ); - /* address space 1 is uncacheable */ - #define SMP_CPU_SWAP( _address, _value, _previous ) \ - do { \ - asm volatile("lock; xchgl %0, %1" : \ - "+m" (*_address), "=a" (_previous) : \ - "1" (_value) : \ - "cc"); \ - } while (0) - static inline void _CPU_Processor_event_broadcast( void ) { __asm__ volatile ( "" : : : "memory" ); |