[PATCH] improved error checking in ticks per timeslice

zakthertemsdev at gmail.com zakthertemsdev at gmail.com
Mon Feb 19 02:13:39 UTC 2024


---
 cpukit/doxygen/appl-config.h          | 2 +-
 cpukit/include/rtems/confdefs/clock.h | 6 ++++++
 2 files changed, 7 insertions(+), 1 deletion(-)

diff --git a/cpukit/doxygen/appl-config.h b/cpukit/doxygen/appl-config.h
index bd7cde628f..d480eb3971 100644
--- a/cpukit/doxygen/appl-config.h
+++ b/cpukit/doxygen/appl-config.h
@@ -3312,7 +3312,7 @@
  * @parblock
  * The following constraints apply to this configuration option:
  *
- * * The value of the configuration option shall be greater than or equal to
+ * * The value of the configuration option shall be greater than 
  *   zero.
  *
  * * The value of the configuration option shall be less than or equal to <a
diff --git a/cpukit/include/rtems/confdefs/clock.h b/cpukit/include/rtems/confdefs/clock.h
index 26519cc70b..f4c4575057 100644
--- a/cpukit/include/rtems/confdefs/clock.h
+++ b/cpukit/include/rtems/confdefs/clock.h
@@ -74,6 +74,12 @@
   #error "CONFIGURE_MICROSECONDS_PER_TICK must be positive"
 #endif
 
+#if defined(CONFIGURE_TICKS_PER_TIMESLICE)
+  #if CONFIGURE_TICKS_PER_TIMESLICE <= 0 
+    #error "CONFIGURE_TICKS_PER_TIMESLICE shall be greater than zero"
+  #endif 
+#endif
+
 #ifdef __cplusplus
 extern "C" {
 #endif
-- 
2.43.0



More information about the devel mailing list