summaryrefslogtreecommitdiffstats
path: root/cpukit
diff options
context:
space:
mode:
authorJoel Sherrill <joel.sherrill@OARcorp.com>2010-03-10 18:15:33 +0000
committerJoel Sherrill <joel.sherrill@OARcorp.com>2010-03-10 18:15:33 +0000
commiteabaf589884f22e6b45e0362562ba7cc12e0aa49 (patch)
tree003bc7f498df54d3c6c56d1f40c77a88ab252164 /cpukit
parentChanged year. (diff)
downloadrtems-eabaf589884f22e6b45e0362562ba7cc12e0aa49.tar.bz2
2010-03-10 Joel Sherrill <joel.sherrill@oarcorp.com>
* score/include/rtems/score/interr.h, score/src/objectinitializeinformation.c: Add new fatal error for configuring unlimited and maximum of 0.
Diffstat (limited to 'cpukit')
-rw-r--r--cpukit/ChangeLog6
-rw-r--r--cpukit/score/include/rtems/score/interr.h3
-rw-r--r--cpukit/score/src/objectinitializeinformation.c11
3 files changed, 19 insertions, 1 deletions
diff --git a/cpukit/ChangeLog b/cpukit/ChangeLog
index e562cbd5dd..ed134541f4 100644
--- a/cpukit/ChangeLog
+++ b/cpukit/ChangeLog
@@ -1,3 +1,9 @@
+2010-03-10 Joel Sherrill <joel.sherrill@oarcorp.com>
+
+ * score/include/rtems/score/interr.h,
+ score/src/objectinitializeinformation.c: Add new fatal error for
+ configuring unlimited and maximum of 0.
+
2010-03-09 Joel Sherrill <joel.sherrilL@oarcorp.com>
* libmisc/Makefile.am: Remove duplicate file from list.
diff --git a/cpukit/score/include/rtems/score/interr.h b/cpukit/score/include/rtems/score/interr.h
index eb654d441f..775c664a77 100644
--- a/cpukit/score/include/rtems/score/interr.h
+++ b/cpukit/score/include/rtems/score/interr.h
@@ -70,7 +70,8 @@ typedef enum {
INTERNAL_ERROR_BAD_ATTRIBUTES,
INTERNAL_ERROR_IMPLEMENTATION_KEY_CREATE_INCONSISTENCY,
INTERNAL_ERROR_IMPLEMENTATION_BLOCKING_OPERATION_CANCEL,
- INTERNAL_ERROR_MUTEX_OBTAIN_FROM_BAD_STATE
+ INTERNAL_ERROR_MUTEX_OBTAIN_FROM_BAD_STATE,
+ INTERNAL_ERROR_UNLIMITED_AND_MAXIMUM_IS_0
} Internal_errors_Core_list;
typedef uint32_t Internal_errors_t;
diff --git a/cpukit/score/src/objectinitializeinformation.c b/cpukit/score/src/objectinitializeinformation.c
index da357708f1..050df7861e 100644
--- a/cpukit/score/src/objectinitializeinformation.c
+++ b/cpukit/score/src/objectinitializeinformation.c
@@ -99,6 +99,17 @@ void _Objects_Initialize_information(
maximum_per_allocation = maximum & ~OBJECTS_UNLIMITED_OBJECTS;
/*
+ * Unlimited and maximum of zero is illogical.
+ */
+ if ( information->auto_extend && maximum_per_allocation == 0) {
+ _Internal_error_Occurred(
+ INTERNAL_ERROR_CORE,
+ true,
+ INTERNAL_ERROR_UNLIMITED_AND_MAXIMUM_IS_0
+ );
+ }
+
+ /*
* The allocation unit is the maximum value
*/
information->allocation_size = maximum_per_allocation;