summaryrefslogtreecommitdiffstats
path: root/cpukit/score/include/rtems/score/tls.h
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2014-04-30 14:54:58 +0200
committerSebastian Huber <sebastian.huber@embedded-brains.de>2014-05-05 08:26:27 +0200
commitbee71f8e97739cfb2b272cbf5c4822c634b7cac7 (patch)
treed6774883a5e1ce3ba3daa255fbcf124c0e5fc364 /cpukit/score/include/rtems/score/tls.h
parenttestsuite: Add a per BSP test check for tests not to build. (diff)
downloadrtems-bee71f8e97739cfb2b272cbf5c4822c634b7cac7.tar.bz2
score: Fix TLS size usage
Diffstat (limited to 'cpukit/score/include/rtems/score/tls.h')
-rw-r--r--cpukit/score/include/rtems/score/tls.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/cpukit/score/include/rtems/score/tls.h b/cpukit/score/include/rtems/score/tls.h
index f9abc27ac9..139db7856c 100644
--- a/cpukit/score/include/rtems/score/tls.h
+++ b/cpukit/score/include/rtems/score/tls.h
@@ -80,6 +80,15 @@ typedef struct {
uintptr_t offset;
} TLS_Index;
+static inline uintptr_t _TLS_Get_size( void )
+{
+ /*
+ * Do not use _TLS_Size here since this will lead GCC to assume that this
+ * symbol is not 0 and the tests for 0 will be optimized away.
+ */
+ return (uintptr_t) _TLS_BSS_end - (uintptr_t) _TLS_Data_begin;
+}
+
static inline uintptr_t _TLS_Heap_align_up( uintptr_t val )
{
uintptr_t msk = CPU_HEAP_ALIGNMENT - 1;