[PATCH] improved error checking in ticks per timeslice

zack leung zakthertemsdev at gmail.com
Wed Feb 21 01:25:00 UTC 2024


ping

On Sun, 18 Feb 2024 at 21:15, <zakthertemsdev at gmail.com> wrote:

> ---
>  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
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rtems.org/pipermail/devel/attachments/20240220/ee1b1e3a/attachment.htm>


More information about the devel mailing list