Changeset 320faf8e in rtems


Ignore:
Timestamp:
Apr 17, 2014, 5:57:09 AM (5 years ago)
Author:
Sebastian Huber <sebastian.huber@…>
Branches:
4.11, master
Children:
782182eb
Parents:
10e613ba
git-author:
Sebastian Huber <sebastian.huber@…> (04/17/14 05:57:09)
git-committer:
Sebastian Huber <sebastian.huber@…> (04/17/14 06:06:40)
Message:

score: Clarify TLS support

Files:
6 edited

Legend:

Unmodified
Added
Removed
  • c/src/lib/libcpu/powerpc/new-exceptions/cpu.c

    r10e613ba r320faf8e  
    136136
    137137  if ( tls_area != NULL ) {
    138     void *tls_block = _TLS_TCB_before_tls_block_initialize( tls_area );
     138    void *tls_block = _TLS_TCB_before_TLS_block_initialize( tls_area );
    139139
    140140    the_ppc_context->gpr2 = (uint32_t) tls_block + 0x7000;
  • cpukit/score/cpu/m68k/cpu.c

    r10e613ba r320faf8e  
    206206
    207207  if ( tls_area != NULL ) {
    208     _TLS_TCB_before_tls_block_initialize( tls_area );
     208    _TLS_TCB_before_TLS_block_initialize( tls_area );
    209209  }
    210210}
  • cpukit/score/cpu/sparc/cpu.c

    r10e613ba r320faf8e  
    328328
    329329  if ( tls_area != NULL ) {
    330     void *tcb = _TLS_TCB_after_tls_block_initialize( tls_area );
     330    void *tcb = _TLS_TCB_after_TLS_block_initialize( tls_area );
    331331
    332332    the_context->g7 = (uintptr_t) tcb;
  • cpukit/score/cpu/sparc64/cpu.c

    r10e613ba r320faf8e  
    104104
    105105  if ( tls_area != NULL ) {
    106     void *tcb = _TLS_TCB_after_tls_block_initialize( tls_area );
     106    void *tcb = _TLS_TCB_after_TLS_block_initialize( tls_area );
    107107
    108108    the_context->g7 = (uintptr_t) tcb;
  • cpukit/score/include/rtems/score/tls.h

    r10e613ba r320faf8e  
    147147
    148148/* Use Variant I, TLS offsets emitted by linker neglects the TCB */
    149 static inline void *_TLS_TCB_before_tls_block_initialize( void *tls_area )
     149static inline void *_TLS_TCB_before_TLS_block_initialize( void *tls_area )
    150150{
    151151  void *tls_block = (char *) tls_area
     
    161161
    162162/* Use Variant II */
    163 static inline void *_TLS_TCB_after_tls_block_initialize( void *tls_area )
     163static inline void *_TLS_TCB_after_TLS_block_initialize( void *tls_area )
    164164{
    165165  uintptr_t size = (uintptr_t) _TLS_Size;
  • doc/cpu_supplement/general.t

    r10e613ba r320faf8e  
    320320facilities mandated by the application binary interface (ABI) of the CPU
    321321architecture.  The CPU port must initialize the TLS area in the
    322 @code{_CPU_Context_Initialize} function.
     322@code{_CPU_Context_Initialize()} function.  There are support functions available
     323via @code{#include <rtems/score/tls.h>} which implement Variants I and II
     324according to Ulrich Drepper, @cite{ELF Handling For Thread-Local Storage}.
     325
     326@table @code
     327
     328@item _TLS_TCB_at_area_begin_initialize()
     329Uses Variant I, TLS offsets emitted by linker takes the TCB into account.  For
     330a reference implementation see @file{cpukit/score/cpu/arm/cpu.c}.
     331
     332@item _TLS_TCB_before_TLS_block_initialize()
     333Uses Variant I, TLS offsets emitted by linker neglects the TCB.  For a
     334reference implementation see
     335@file{c/src/lib/libcpu/powerpc/new-exceptions/cpu.c}.
     336
     337@item _TLS_TCB_after_TLS_block_initialize()
     338Uses Variant II.  For a reference implementation see
     339@file{cpukit/score/cpu/sparc/cpu.c}.
     340
     341@end table
    323342
    324343The board support package (BSP) must provide the following sections and symbols
Note: See TracChangeset for help on using the changeset viewer.