diff options
author | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2011-11-10 14:40:13 +0000 |
---|---|---|
committer | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2011-11-10 14:40:13 +0000 |
commit | b4f635e9d00dc0dfa871e886b9f130e0798b2f82 (patch) | |
tree | 0f8ccbe555f1491c4a5c9b5f7f825b11d332eaef /cpukit/sapi/include/rtems/config.h | |
parent | 2011-11-10 Sebastian Huber <sebastian.huber@embedded-brains.de> (diff) | |
download | rtems-b4f635e9d00dc0dfa871e886b9f130e0798b2f82.tar.bz2 |
2011-11-10 Sebastian Huber <sebastian.huber@embedded-brains.de>
PR 1924/cpukit
* sapi/include/rtems/config.h: New fields stack_space_size,
unified_work_area, and stack_allocator_avoids_work_space in
rtems_configuration_table.
* sapi/include/confdefs.h: Removed rtems_unified_work_area (this is
now part of the Configuration). Separate work space and stack space
estimate. Added CONFIGURE_TASK_STACK_ALLOCATOR_AVOIDS_WORK_SPACE
configuration option.
* libmisc/shell/main_wkspaceinfo.c, score/src/wkspace.c,
libcsupport/src/malloc_initialize.c: Update due to API changes.
Diffstat (limited to 'cpukit/sapi/include/rtems/config.h')
-rw-r--r-- | cpukit/sapi/include/rtems/config.h | 48 |
1 files changed, 45 insertions, 3 deletions
diff --git a/cpukit/sapi/include/rtems/config.h b/cpukit/sapi/include/rtems/config.h index c2d71b0746..590999c029 100644 --- a/cpukit/sapi/include/rtems/config.h +++ b/cpukit/sapi/include/rtems/config.h @@ -104,6 +104,10 @@ typedef struct { */ uintptr_t work_space_size; + /** This field specifies the size in bytes of the RTEMS thread stack space. + */ + uintptr_t stack_space_size; + /** This field specifies the maximum number of dynamically installed * used extensions. */ @@ -152,6 +156,23 @@ typedef struct { */ bool do_zero_of_workspace; + /** + * @brief Specifies if a unified work area is used or not. + * + * If this element is @a true, then the RTEMS Workspace and the C Program + * Heap use the same heap, otherwise they use separate heaps. + */ + bool unified_work_area; + + /** + * @brief Specifies if the stack allocator avoids the work space. + * + * If this element is @a true, then the stack allocator must not allocate the + * thread stacks from the RTEMS Workspace, otherwise it should allocate the + * thread stacks from the RTEMS Workspace. + */ + bool stack_allocator_avoids_work_space; + uint32_t maximum_drivers; uint32_t number_of_device_drivers; rtems_driver_address_table *Device_driver_table; @@ -193,11 +214,31 @@ extern rtems_configuration_table Configuration; #define rtems_configuration_get_table() \ (&Configuration) +#define rtems_configuration_get_unified_work_area() \ + (Configuration.unified_work_area) + +#define rtems_configuration_get_stack_allocator_avoids_work_space() \ + (Configuration.stack_allocator_avoids_work_space) + +#define rtems_configuration_get_stack_space_size() \ + (Configuration.stack_space_size) + +#define rtems_configuration_set_stack_space_size( _size ) \ + do { Configuration.stack_space_size = (_size); } while (0) + #define rtems_configuration_get_work_space_start() \ (Configuration.work_space_start) +#define rtems_configuration_set_work_space_start( _start ) \ + do { Configuration.work_space_start = (_start); } while (0) + #define rtems_configuration_get_work_space_size() \ - (Configuration.work_space_size) + (Configuration.work_space_size + \ + (rtems_configuration_get_stack_allocator_avoids_work_space() ? \ + 0 : rtems_configuration_get_stack_space_size())) + +#define rtems_configuration_set_work_space_size( _size ) \ + do { Configuration.work_space_size = (_size); } while (0) #define rtems_configuration_get_maximum_extensions() \ (Configuration.maximum_extensions) @@ -254,9 +295,10 @@ extern rtems_configuration_table Configuration; #if defined(RTEMS_MULTIPROCESSING) #define rtems_configuration_get_user_multiprocessing_table() \ - (Configuration.User_multiprocessing_table) + (Configuration.User_multiprocessing_table) #else - #define rtems_configuration_get_user_multiprocessing_table() NULL + #define rtems_configuration_get_user_multiprocessing_table() \ + NULL #endif #define rtems_configuration_get_rtems_api_configuration() \ |