summaryrefslogtreecommitdiffstats
path: root/cpukit/include/rtems/confdefs/clock.h
diff options
context:
space:
mode:
authorZack leung <z.liang111@gmail.com>2024-03-14 12:53:50 -0500
committerJoel Sherrill <joel@rtems.org>2024-03-14 12:58:59 -0500
commit5ee87eee8a19acb5a5be16ed4f1a4fdd0da976c6 (patch)
treec31dfa7c686c12d807ab7b523c104cdf04c44242 /cpukit/include/rtems/confdefs/clock.h
parentbsps/shared/xqspipsu: Read correct status bits (diff)
downloadrtems-5ee87eee8a19acb5a5be16ed4f1a4fdd0da976c6.tar.bz2
Ensure ticks per timeslice is greater than zero
Diffstat (limited to '')
-rw-r--r--cpukit/include/rtems/confdefs/clock.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/cpukit/include/rtems/confdefs/clock.h b/cpukit/include/rtems/confdefs/clock.h
index 26519cc70b..bb6c7e0b68 100644
--- a/cpukit/include/rtems/confdefs/clock.h
+++ b/cpukit/include/rtems/confdefs/clock.h
@@ -70,6 +70,10 @@
#warning "The clock ticks per second is not an integer"
#endif
+#if defined(CONFIGURE_TICKS_PER_TIMESLICE) && CONFIGURE_TICKS_PER_TIMESLICE <= 0
+ #error "CONFIGURE_TICKS_PER_TIMESLICE shall be greater than zero"
+#endif
+
#if CONFIGURE_MICROSECONDS_PER_TICK <= 0
#error "CONFIGURE_MICROSECONDS_PER_TICK must be positive"
#endif