diff options
Diffstat (limited to 'cpukit/score/src/wkspace.c')
-rw-r--r-- | cpukit/score/src/wkspace.c | 8 |
1 files changed, 8 insertions, 0 deletions
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 ); |