diff options
author | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2014-01-28 12:10:08 +0100 |
---|---|---|
committer | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2014-02-04 10:06:35 +0100 |
commit | 022851aba54d32831feaff13deb3d9943e130eee (patch) | |
tree | c1d6a8404dae393bd147790f6a9cf09c2f327b5a /cpukit/score/cpu/m68k/rtems | |
parent | bsps: Thread-local storage (TLS) for linkcmds (diff) | |
download | rtems-022851aba54d32831feaff13deb3d9943e130eee.tar.bz2 |
Add thread-local storage (TLS) support
Tested and implemented on ARM, m68k, PowerPC and SPARC. Other
architectures need more work.
Diffstat (limited to 'cpukit/score/cpu/m68k/rtems')
-rw-r--r-- | cpukit/score/cpu/m68k/rtems/score/cpu.h | 33 |
1 files changed, 9 insertions, 24 deletions
diff --git a/cpukit/score/cpu/m68k/rtems/score/cpu.h b/cpukit/score/cpu/m68k/rtems/score/cpu.h index ccec3a6a64..9981f5393d 100644 --- a/cpukit/score/cpu/m68k/rtems/score/cpu.h +++ b/cpukit/score/cpu/m68k/rtems/score/cpu.h @@ -448,30 +448,15 @@ uint32_t _CPU_ISR_Get_level( void ); * + initialize an FP context area */ -#if (defined(__mcoldfire__) && ( M68K_HAS_FPU == 1 )) -#define _CPU_Context_Initialize( _the_context, _stack_base, _size, \ - _isr, _entry_point, _is_fp ) \ - do { \ - uint32_t _stack; \ - \ - (_the_context)->sr = 0x3000 | ((_isr) << 8); \ - _stack = (uint32_t)(_stack_base) + (_size) - 4; \ - (_the_context)->a7_msp = (void *)_stack; \ - *(void **)_stack = (void *)(_entry_point); \ - (_the_context)->fpu_dis = (_is_fp == TRUE) ? 0x00 : 0x10; \ - } while ( 0 ) -#else -#define _CPU_Context_Initialize( _the_context, _stack_base, _size, \ - _isr, _entry_point, _is_fp ) \ - do { \ - uint32_t _stack; \ - \ - (_the_context)->sr = 0x3000 | ((_isr) << 8); \ - _stack = (uint32_t)(_stack_base) + (_size) - 4; \ - (_the_context)->a7_msp = (void *)_stack; \ - *(void **)_stack = (void *)(_entry_point); \ - } while ( 0 ) -#endif +void _CPU_Context_Initialize( + Context_Control *the_context, + void *stack_area_begin, + size_t stack_area_size, + uint32_t new_level, + void (*entry_point)( void ), + bool is_fp, + void *tls_area +); /* end of Context handler macros */ |