From 517bf089dc327979ce7eac1ea7e8e1cd4e60d405 Mon Sep 17 00:00:00 2001 From: Sebastian Huber Date: Tue, 13 Dec 2011 10:52:21 +0000 Subject: 2011-12-13 Sebastian Huber * sapi/include/confdefs.h: Fixed workspace size estimate of POSIX keys and message queues. --- cpukit/ChangeLog | 5 +++++ cpukit/sapi/include/confdefs.h | 12 +++++------- 2 files changed, 10 insertions(+), 7 deletions(-) diff --git a/cpukit/ChangeLog b/cpukit/ChangeLog index 81dfea2ea7..6d68c6ed81 100644 --- a/cpukit/ChangeLog +++ b/cpukit/ChangeLog @@ -1,3 +1,8 @@ +2011-12-13 Sebastian Huber + + * sapi/include/confdefs.h: Fixed workspace size estimate of POSIX keys + and message queues. + 2011-12-13 Sebastian Huber * score/include/rtems/score/wkspace.h, score/src/wkstringduplicate.c: diff --git a/cpukit/sapi/include/confdefs.h b/cpukit/sapi/include/confdefs.h index c064b57135..e2f5f0e947 100644 --- a/cpukit/sapi/include/confdefs.h +++ b/cpukit/sapi/include/confdefs.h @@ -1527,17 +1527,14 @@ rtems_fs_init_functions_t rtems_fs_init_helper = */ #define _Configure_POSIX_Named_Object_RAM(_number, _size) \ _Configure_Object_RAM( (_number), _size ) + \ - ((_number) + _Configure_From_workspace(NAME_MAX) ) + ((_number) * _Configure_From_workspace(NAME_MAX) ) #ifndef CONFIGURE_MAXIMUM_POSIX_THREADS #define CONFIGURE_MAXIMUM_POSIX_THREADS 0 #endif #define CONFIGURE_MEMORY_PER_TASK_FOR_POSIX_API \ - _Configure_From_workspace( \ - sizeof (POSIX_API_Control) + \ - (sizeof (void *) * (CONFIGURE_MAXIMUM_POSIX_KEYS)) \ - ) + _Configure_From_workspace(sizeof(POSIX_API_Control)) #ifndef CONFIGURE_MAXIMUM_POSIX_MUTEXES #define CONFIGURE_MAXIMUM_POSIX_MUTEXES 0 @@ -1561,7 +1558,8 @@ rtems_fs_init_functions_t rtems_fs_init_helper = #define CONFIGURE_MEMORY_FOR_POSIX_KEYS(_keys) 0 #else #define CONFIGURE_MEMORY_FOR_POSIX_KEYS(_keys) \ - _Configure_Object_RAM(_keys, sizeof(POSIX_Keys_Control) ) + (_Configure_Object_RAM(_keys, sizeof(POSIX_Keys_Control) ) \ + + (_keys) * 3 * _Configure_From_workspace(sizeof(void *) * 2)) #endif #ifndef CONFIGURE_MAXIMUM_POSIX_TIMERS @@ -1598,7 +1596,7 @@ rtems_fs_init_functions_t rtems_fs_init_helper = #endif #define CONFIGURE_MEMORY_FOR_POSIX_MESSAGE_QUEUE_DESCRIPTORS(_mqueue_fds) \ - _Configure_POSIX_Named_Object_RAM( \ + _Configure_Object_RAM( \ _mqueue_fds, sizeof(POSIX_Message_queue_Control_fd) ) #endif -- cgit v1.2.3