[PATCH] improved error checking in ticks per timeslice

zack leung zakthertemsdev at gmail.com
Tue Mar 5 01:38:48 UTC 2024


ping


On Tue, 27 Feb 2024 at 21:33, zack leung <zakthertemsdev at gmail.com> wrote:

>
> joel said:
>    +#if CONFIGURE_TICKS_PER_TIMESLICE <= 0 &&
> >     defined(CONFIGURE_TICKS_PER_TIMESLICE)
> >     +  #error "CONFIGURE_TICKS_PER_TIMESLICE shall be greater than zero"
> >     +#endif
> >     +
> >
> >
> > This is modifying the right file but I think it is safer to check that
> > it is defined
> > before checking its value.
>
> Yes, the defined() check should be first. - sebestian
>
> You said this in relation to joel's comment in my previous thread. You can
> check in either one.  The  previous one used the "and" statement.
>
> Zack
>
> On Tue, 27 Feb 2024 at 02:08, Sebastian Huber <
> sebastian.huber at embedded-brains.de> wrote:
>
>> On 19.02.24 03:13, zakthertemsdev at gmail.com wrote:
>> > +#if defined(CONFIGURE_TICKS_PER_TIMESLICE)
>> > +  #if CONFIGURE_TICKS_PER_TIMESLICE <= 0
>> > +    #error "CONFIGURE_TICKS_PER_TIMESLICE shall be greater than zero"
>> > +  #endif
>> > +#endif
>>
>> This should be
>>
>> #if defined(CONFIGURE_TICKS_PER_TIMESLICE) &&
>> CONFIGURE_TICKS_PER_TIMESLICE <= 0
>>
>> from my point of view. Just check the style of the related header files
>> for a reference.
>>
>> --
>> embedded brains GmbH & Co. KG
>> Herr Sebastian HUBER
>> Dornierstr. 4
>> 82178 Puchheim
>> Germany
>> email: sebastian.huber at embedded-brains.de
>> phone: +49-89-18 94 741 - 16
>> fax:   +49-89-18 94 741 - 08
>>
>> Registergericht: Amtsgericht München
>> Registernummer: HRB 157899
>> Vertretungsberechtigte Geschäftsführer: Peter Rasmussen, Thomas Dörfler
>> Unsere Datenschutzerklärung finden Sie hier:
>> https://embedded-brains.de/datenschutzerklaerung/
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rtems.org/pipermail/devel/attachments/20240304/65a85431/attachment.htm>


More information about the devel mailing list