[PATCH] improved error checking in ticks per timeslice

Will nyphbl8d at gmail.com
Wed Mar 6 13:42:12 UTC 2024


Hey Zack,
Sebastian posted exactly what he thought those lines should be to match the
surrounding coding style:
#if defined(CONFIGURE_TICKS_PER_TIMESLICE) &&
   CONFIGURE_TICKS_PER_TIMESLICE <= 0

It should just be a single #if like that and with that order of
conditionals. You'll of course need to remove the second #endif since
you're going to 1 #if.

Kinsey

On Tue, Mar 5, 2024 at 8:44 PM <zakthertemsdev at gmail.com> wrote:

> From: Zack leung <z.liang111 at gmail.com>
>
> 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..bcca02bd43 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 CONFIGURE_TICKS_PER_TIMESLICE <= 0
> +  #if defined(CONFIGURE_TICKS_PER_TIMESLICE)
> +    #error "CONFIGURE_TICKS_PER_TIMESLICE shall be greater than zero"
> +  #endif
> +#endif
> +
>  #ifdef __cplusplus
>  extern "C" {
>  #endif
> --
> 2.43.0
>
> _______________________________________________
> devel mailing list
> devel at rtems.org
> http://lists.rtems.org/mailman/listinfo/devel
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rtems.org/pipermail/devel/attachments/20240306/a4448992/attachment.htm>


More information about the devel mailing list