From 884a6c59ba418017db4b5239283f3d436a12b849 Mon Sep 17 00:00:00 2001 From: Sebastian Huber Date: Wed, 21 May 2014 09:18:29 +0200 Subject: score: Add comment regarding TLS workspace size --- cpukit/score/src/wkspace.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/cpukit/score/src/wkspace.c b/cpukit/score/src/wkspace.c index 1dda9f124c..94ce5cb397 100644 --- a/cpukit/score/src/wkspace.c +++ b/cpukit/score/src/wkspace.c @@ -66,6 +66,14 @@ void _Workspace_Handler_initialization( uintptr_t tls_size = _TLS_Get_size(); size_t i; + /* + * In case we have a non-zero TLS size, then we need a TLS area for each + * thread. These areas are allocated from the workspace. Ensure that the + * workspace is large enough to fulfill all requests known at configuration + * time (so excluding the unlimited option). It is not possible to estimate + * the TLS size in the configuration at compile-time. The TLS size is + * determined at application link-time. + */ if ( tls_size > 0 ) { uintptr_t tls_align = _TLS_Heap_align_up( (uintptr_t) _TLS_Alignment ); uintptr_t tls_alloc = _TLS_Get_allocation_size( tls_size, tls_align ); -- cgit v1.2.3