summaryrefslogtreecommitdiffstats
path: root/cpukit
diff options
context:
space:
mode:
authorGedare Bloom <gedare@rtems.org>2012-03-26 16:42:38 -0400
committerGedare Bloom <gedare@rtems.org>2012-03-27 19:51:31 -0400
commite53aae2676c42cda521328504f82d26c33827021 (patch)
treebae4748b9a2db645f8da88fe8b72e676b161c25f /cpukit
parentGRETH: added support for non-snooping GRETH 10/100 systems (diff)
downloadrtems-e53aae2676c42cda521328504f82d26c33827021.tar.bz2
confdefs: Add declaration for unlimited objects.
Adds to confdefs a way to specify rtems_resource_unlimited for classic and posix objects using a new macro CONFIGURE_OBJECTS_UNLIMITED. Use CONFIGURE_OBJECTS_ALLOCATION_SIZE to declare the allocation size for extending the set of objects at runtime. Updates the unlimited sample to demonstrate how to use the new macros. Also adds new documentation in the C User's Manual regarding configuring with unlimited objects.
Diffstat (limited to 'cpukit')
-rw-r--r--cpukit/sapi/include/confdefs.h108
1 files changed, 107 insertions, 1 deletions
diff --git a/cpukit/sapi/include/confdefs.h b/cpukit/sapi/include/confdefs.h
index 8f03c876a9..ab8e473789 100644
--- a/cpukit/sapi/include/confdefs.h
+++ b/cpukit/sapi/include/confdefs.h
@@ -1344,6 +1344,112 @@ rtems_fs_init_functions_t rtems_fs_init_helper =
#endif
+/**
+ * This macro specifies that the user wants to use unlimited objects for any
+ * classic or posix objects that have not already been given resource limits.
+ */
+#if defined(CONFIGURE_UNLIMITED_OBJECTS)
+ #if !defined(CONFIGURE_UNLIMITED_ALLOCATION_SIZE)
+ /**
+ * This macro specifies a default allocation size for when auto-extending
+ * unlimited objects if none was given by the user.
+ */
+ #define CONFIGURE_UNLIMITED_ALLOCATION_SIZE 8
+ #endif
+ #if !defined(CONFIGURE_MAXIMUM_TASKS)
+ #define CONFIGURE_MAXIMUM_TASKS \
+ rtems_resource_unlimited(CONFIGURE_UNLIMITED_ALLOCATION_SIZE)
+ #endif
+ #if !defined(CONFIGURE_MAXIMUM_TIMERS)
+ #define CONFIGURE_MAXIMUM_TIMERS \
+ rtems_resource_unlimited(CONFIGURE_UNLIMITED_ALLOCATION_SIZE)
+ #endif
+ #if !defined(CONFIGURE_MAXIMUM_SEMAPHORES)
+ #define CONFIGURE_MAXIMUM_SEMAPHORES \
+ rtems_resource_unlimited(CONFIGURE_UNLIMITED_ALLOCATION_SIZE)
+ #endif
+ #if !defined(CONFIGURE_MAXIMUM_MESSAGE_QUEUES)
+ #define CONFIGURE_MAXIMUM_MESSAGE_QUEUES \
+ rtems_resource_unlimited(CONFIGURE_UNLIMITED_ALLOCATION_SIZE)
+ #endif
+ #if !defined(CONFIGURE_MAXIMUM_PARTITIONS)
+ #define CONFIGURE_MAXIMUM_PARTITIONS \
+ rtems_resource_unlimited(CONFIGURE_UNLIMITED_ALLOCATION_SIZE)
+ #endif
+ #if !defined(CONFIGURE_MAXIMUM_REGIONS)
+ #define CONFIGURE_MAXIMUM_REGIONS \
+ rtems_resource_unlimited(CONFIGURE_UNLIMITED_ALLOCATION_SIZE)
+ #endif
+ #if !defined(CONFIGURE_MAXIMUM_PORTS)
+ #define CONFIGURE_MAXIMUM_PORTS \
+ rtems_resource_unlimited(CONFIGURE_UNLIMITED_ALLOCATION_SIZE)
+ #endif
+ #if !defined(CONFIGURE_MAXIMUM_PERIODS)
+ #define CONFIGURE_MAXIMUM_PERIODS \
+ rtems_resource_unlimited(CONFIGURE_UNLIMITED_ALLOCATION_SIZE)
+ #endif
+ #if !defined(CONFIGURE_MAXIMUM_BARRIERS)
+ #define CONFIGURE_MAXIMUM_BARRIERS \
+ rtems_resource_unlimited(CONFIGURE_UNLIMITED_ALLOCATION_SIZE)
+ #endif
+
+ #ifdef RTEMS_POSIX_API
+ #if !defined(CONFIGURE_MAXIMUM_POSIX_THREADS)
+ #define CONFIGURE_MAXIMUM_POSIX_THREADS \
+ rtems_resource_unlimited(CONFIGURE_UNLIMITED_ALLOCATION_SIZE)
+ #endif
+ #if !defined(CONFIGURE_MAXIMUM_POSIX_MUTEXES)
+ #define CONFIGURE_MAXIMUM_POSIX_MUTEXES \
+ rtems_resource_unlimited(CONFIGURE_UNLIMITED_ALLOCATION_SIZE)
+ #endif
+ #if !defined(CONFIGURE_MAXIMUM_POSIX_CONDITION_VARIABLES)
+ #define CONFIGURE_MAXIMUM_POSIX_CONDITION_VARIABLES \
+ rtems_resource_unlimited(CONFIGURE_UNLIMITED_ALLOCATION_SIZE)
+ #endif
+/*
+ #if !defined(CONFIGURE_MAXIMUM_POSIX_KEYS)
+ #define CONFIGURE_MAXIMUM_POSIX_KEYS \
+ rtems_resource_unlimited(CONFIGURE_UNLIMITED_ALLOCATION_SIZE)
+ #endif
+*/
+ #if !defined(CONFIGURE_MAXIMUM_POSIX_TIMERS)
+ #define CONFIGURE_MAXIMUM_POSIX_TIMERS \
+ rtems_resource_unlimited(CONFIGURE_UNLIMITED_ALLOCATION_SIZE)
+ #endif
+/*
+ #if !defined(CONFIGURE_MAXIMUM_POSIX_QUEUED_SIGNALS)
+ #define CONFIGURE_MAXIMUM_POSIX_QUEUED_SIGNALS \
+ rtems_resource_unlimited(CONFIGURE_UNLIMITED_ALLOCATION_SIZE)
+ #endif
+*/
+ #if !defined(CONFIGURE_MAXIMUM_POSIX_MESSAGE_QUEUES)
+ #define CONFIGURE_MAXIMUM_POSIX_MESSAGE_QUEUES \
+ rtems_resource_unlimited(CONFIGURE_UNLIMITED_ALLOCATION_SIZE)
+ #endif
+ #if !defined(CONFIGURE_MAXIMUM_POSIX_MESSAGE_QUEUE_DESCRIPTORS)
+ #define CONFIGURE_MAXIMUM_POSIX_MESSAGE_QUEUE_DESCRIPTORS \
+ rtems_resource_unlimited(CONFIGURE_UNLIMITED_ALLOCATION_SIZE)
+ #endif
+ #if !defined(CONFIGURE_MAXIMUM_POSIX_SEMAPHORES)
+ #define CONFIGURE_MAXIMUM_POSIX_SEMAPHORES \
+ rtems_resource_unlimited(CONFIGURE_UNLIMITED_ALLOCATION_SIZE)
+ #endif
+ #if !defined(CONFIGURE_MAXIMUM_POSIX_BARRIERS)
+ #define CONFIGURE_MAXIMUM_POSIX_BARRIERS \
+ rtems_resource_unlimited(CONFIGURE_UNLIMITED_ALLOCATION_SIZE)
+ #endif
+ #if !defined(CONFIGURE_MAXIMUM_POSIX_RWLOCKS)
+ #define CONFIGURE_MAXIMUM_POSIX_RWLOCKS \
+ rtems_resource_unlimited(CONFIGURE_UNLIMITED_ALLOCATION_SIZE)
+ #endif
+ #if !defined(CONFIGURE_MAXIMUM_POSIX_SPINLOCKS)
+ #define CONFIGURE_MAXIMUM_POSIX_SPINLOCKS \
+ rtems_resource_unlimited(CONFIGURE_UNLIMITED_ALLOCATION_SIZE)
+ #endif
+ #endif /* RTEMS_POSIX_API */
+#endif /* CONFIGURE_UNLIMITED_OBJECTS */
+
+
/*
* Default Configuration Table.
*/
@@ -1548,7 +1654,7 @@ 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) )
+ (_Configure_Max_Objects(_number) * _Configure_From_workspace(NAME_MAX) )
#ifndef CONFIGURE_MAXIMUM_POSIX_THREADS
#define CONFIGURE_MAXIMUM_POSIX_THREADS 0