* sapi/include/confdefs.h: Fixed workspace size estimate of POSIX keys
	and message queues.
This commit is contained in:
Sebastian Huber
2011-12-13 10:52:21 +00:00
parent 9c2d082ba9
commit 517bf089dc
2 changed files with 10 additions and 7 deletions

View File

@@ -1,3 +1,8 @@
2011-12-13 Sebastian Huber <sebastian.huber@embedded-brains.de>
* sapi/include/confdefs.h: Fixed workspace size estimate of POSIX keys
and message queues.
2011-12-13 Sebastian Huber <sebastian.huber@embedded-brains.de>
* score/include/rtems/score/wkspace.h, score/src/wkstringduplicate.c:

View File

@@ -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