summaryrefslogtreecommitdiffstats
path: root/cpukit/score/src/wkspace.c
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2018-11-22 19:14:51 +0100
committerSebastian Huber <sebastian.huber@embedded-brains.de>2018-12-14 07:03:29 +0100
commit21275b58a5a69c3c838082ffc8a7a3641f32ea9a (patch)
treed331e17c15d71f107d0f14581a93ddf768b05813 /cpukit/score/src/wkspace.c
parentrtems: Use object information to get config max (diff)
downloadrtems-21275b58a5a69c3c838082ffc8a7a3641f32ea9a.tar.bz2
score: Static Objects_Information initialization
Statically allocate the objects information together with the initial set of objects either via <rtems/confdefs.h>. Provide default object informations with zero objects via librtemscpu.a. This greatly simplifies the workspace size estimate. RTEMS applications which do not use the unlimited objects option are easier to debug since all objects reside now in statically allocated objects of the right types. Close #3621.
Diffstat (limited to 'cpukit/score/src/wkspace.c')
-rw-r--r--cpukit/score/src/wkspace.c20
1 files changed, 1 insertions, 19 deletions
diff --git a/cpukit/score/src/wkspace.c b/cpukit/score/src/wkspace.c
index c9df793526..95c4127056 100644
--- a/cpukit/score/src/wkspace.c
+++ b/cpukit/score/src/wkspace.c
@@ -42,24 +42,6 @@ RTEMS_LINKER_RWSET(
Heap_Control _Workspace_Area;
-static uint32_t _Workspace_Get_maximum_thread_count( void )
-{
- uint32_t thread_count;
-
- thread_count = 0;
- thread_count += _Thread_Get_maximum_internal_threads();
-
- thread_count += rtems_resource_maximum_per_allocation(
- Configuration_RTEMS_API.maximum_tasks
- );
-
- thread_count += rtems_resource_maximum_per_allocation(
- _Configuration_POSIX_Maximum_threads
- );
-
- return thread_count;
-}
-
static uintptr_t _Workspace_Space_for_TLS( uintptr_t page_size )
{
uintptr_t tls_size;
@@ -86,7 +68,7 @@ static uintptr_t _Workspace_Space_for_TLS( uintptr_t page_size )
*/
space = _Heap_Min_block_size( page_size );
- space += _Workspace_Get_maximum_thread_count()
+ space += _Thread_Initial_thread_count
* _Heap_Size_with_overhead( page_size, tls_alloc, tls_align );
} else {
space = 0;