[PATCH] improved error checking in ticks per timeslice
zack leung
zakthertemsdev at gmail.com
Thu Mar 14 17:49:55 UTC 2024
Did you check in the code?
Il mar 12 mar 2024, 21:55 Kinsey Moore <kinsey.moore at oarcorp.com> ha
scritto:
> Sorry, I missed this in the deluge of emails. Looks good to me.
>
> Kinsey
>
> On Tue, Mar 12, 2024 at 8:17 PM zack leung <zakthertemsdev at gmail.com>
> wrote:
>
>> ping
>>
>> On Fri, 8 Mar 2024 at 22:03, <zakthertemsdev at gmail.com> wrote:
>>
>>> From: Zack leung <z.liang111 at gmail.com>
>>>
>>> ---
>>> cpukit/doxygen/appl-config.h | 3 +--
>>> cpukit/include/rtems/confdefs/clock.h | 4 ++++
>>> 2 files changed, 5 insertions(+), 2 deletions(-)
>>>
>>> diff --git a/cpukit/doxygen/appl-config.h b/cpukit/doxygen/appl-config.h
>>> index bd7cde628f..f843ebbd39 100644
>>> --- a/cpukit/doxygen/appl-config.h
>>> +++ b/cpukit/doxygen/appl-config.h
>>> @@ -3312,8 +3312,7 @@
>>> * @parblock
>>> * The following constraints apply to this configuration option:
>>> *
>>> - * * The value of the configuration option shall be greater than or
>>> equal to
>>> - * zero.
>>> + * * 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
>>> * href="https://en.cppreference.com/w/c/types/integer
>>> ">UINT32_MAX</a>.
>>> 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
>>> --
>>> 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/20240314/f4692c92/attachment-0001.htm>
More information about the devel
mailing list