summaryrefslogtreecommitdiffstats
path: root/cpukit/include
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2021-05-14 08:09:34 +0200
committerSebastian Huber <sebastian.huber@embedded-brains.de>2021-05-14 08:09:34 +0200
commit45a34953256b237171a2ceea310b370b309cd29b (patch)
tree3e08a78dc8e758fa586509bb31761653c23f4de7 /cpukit/include
parentrtems: Constify rtems_task_wake_when() (diff)
downloadrtems-45a34953256b237171a2ceea310b370b309cd29b.tar.bz2
rtems: Add TOD_Ticks_validation
Replace defines with an enum. Update #4406.
Diffstat (limited to 'cpukit/include')
-rw-r--r--cpukit/include/rtems/rtems/clockimpl.h31
1 files changed, 19 insertions, 12 deletions
diff --git a/cpukit/include/rtems/rtems/clockimpl.h b/cpukit/include/rtems/rtems/clockimpl.h
index 404b8234ee..c8334afaf3 100644
--- a/cpukit/include/rtems/rtems/clockimpl.h
+++ b/cpukit/include/rtems/rtems/clockimpl.h
@@ -35,16 +35,22 @@ extern "C" {
*/
/**
- * @brief Using this constant for the ticks mask disables the validation of the
- * ticks member in _TOD_Validate().
+ * @brief The enumerators of this type determine if the ticks member is
+ * validated in _TOD_Validate().
*/
-#define TOD_DISABLE_TICKS_VALIDATION 0
+typedef enum {
+ /**
+ * @brief Use this option to disable the validation of the ticks member in
+ * _TOD_Validate().
+ */
+ TOD_DISABLE_TICKS_VALIDATION = 0,
-/**
- * @brief Using this constant for the ticks mask enables the validation of the
- * ticks member in _TOD_Validate().
- */
-#define TOD_ENABLE_TICKS_VALIDATION UINT32_MAX
+ /**
+ * @brief Use this option to enable the validation of the ticks member in
+ * _TOD_Validate().
+ */
+ TOD_ENABLE_TICKS_VALIDATION = -1
+} TOD_Ticks_validation;
/**
* @brief Validates the time of day.
@@ -52,9 +58,10 @@ extern "C" {
* @param the_tod is the reference to the time of day structure to validate or
* NULL.
*
- * @param ticks_mask is the mask for the ticks member of the time of day. Use
- * #TOD_ENABLE_TICKS_VALIDATION to validate the ticks member. Use
- * #TOD_DISABLE_TICKS_VALIDATION to skip the validation of the ticks member.
+ * @param ticks_validation indicates if the ticks member of the time of day
+ * should be validated. Use #TOD_ENABLE_TICKS_VALIDATION to validate the
+ * ticks member. Use #TOD_DISABLE_TICKS_VALIDATION to skip the validation of
+ * the ticks member.
*
* @retval RTEMS_SUCCESSFUL @a the_tod references a valid time of day.
* @retval RTEMS_INVALID_CLOCK @a the_tod references an invalid time of day.
@@ -62,7 +69,7 @@ extern "C" {
*/
rtems_status_code _TOD_Validate(
const rtems_time_of_day *the_tod,
- uint32_t ticks_mask
+ TOD_Ticks_validation ticks_validation
);
/**