Changeset bee71f8e in rtems


Ignore:
Timestamp:
Apr 30, 2014, 12:54:58 PM (6 years ago)
Author:
Sebastian Huber <sebastian.huber@…>
Branches:
4.11, master
Children:
d20b029
Parents:
1461b648
git-author:
Sebastian Huber <sebastian.huber@…> (04/30/14 12:54:58)
git-committer:
Sebastian Huber <sebastian.huber@…> (05/05/14 06:26:27)
Message:

score: Fix TLS size usage

Location:
cpukit/score
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • cpukit/score/include/rtems/score/tls.h

    r1461b648 rbee71f8e  
    8080  uintptr_t offset;
    8181} TLS_Index;
     82
     83static inline uintptr_t _TLS_Get_size( void )
     84{
     85  /*
     86   * Do not use _TLS_Size here since this will lead GCC to assume that this
     87   * symbol is not 0 and the tests for 0 will be optimized away.
     88   */
     89  return (uintptr_t) _TLS_BSS_end - (uintptr_t) _TLS_Data_begin;
     90}
    8291
    8392static inline uintptr_t _TLS_Heap_align_up( uintptr_t val )
  • cpukit/score/src/threadinitialize.c

    r1461b648 rbee71f8e  
    4444)
    4545{
     46  uintptr_t                tls_size = _TLS_Get_size();
    4647  size_t                   actual_stack_size = 0;
    4748  void                    *stack = NULL;
     
    5253  size_t                   i;
    5354  bool                     scheduler_allocated = false;
    54 
    55   /*
    56    * Do not use _TLS_Size here since this will lead GCC to assume that this
    57    * symbol is not 0 and the later > 0 test will be optimized away.
    58    */
    59   uintptr_t  tls_size = (uintptr_t) _TLS_BSS_end - (uintptr_t) _TLS_Data_begin;
    6055
    6156#if defined( RTEMS_SMP )
  • cpukit/score/src/wkspace.c

    r1461b648 rbee71f8e  
    6464  uintptr_t page_size = CPU_HEAP_ALIGNMENT;
    6565  uintptr_t overhead = _Heap_Area_overhead( page_size );
    66   uintptr_t tls_size = (uintptr_t) _TLS_Size;
     66  uintptr_t tls_size = _TLS_Get_size();
    6767  size_t i;
    6868
Note: See TracChangeset for help on using the changeset viewer.