[rtems commit] score: Add comment regarding TLS workspace size
Sebastian Huber
sebh at rtems.org
Wed May 21 07:33:20 UTC 2014
Module: rtems
Branch: master
Commit: 884a6c59ba418017db4b5239283f3d436a12b849
Changeset: http://git.rtems.org/rtems/commit/?id=884a6c59ba418017db4b5239283f3d436a12b849
Author: Sebastian Huber <sebastian.huber at embedded-brains.de>
Date: Wed May 21 09:18:29 2014 +0200
score: Add comment regarding TLS workspace size
---
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 1dda9f1..94ce5cb 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 );
More information about the vc
mailing list