[PATCH 3/4] CONFIGURE_MAXIMUM_THREAD_LOCAL_STORAGE_SIZE

Gedare Bloom gedare at rtems.org
Wed Mar 3 16:48:00 UTC 2021


On Wed, Mar 3, 2021 at 9:06 AM Sebastian Huber
<sebastian.huber at embedded-brains.de> wrote:
>
> On 03/03/2021 16:56, Gedare Bloom wrote:
>
> >> diff --git a/cpukit/include/rtems/confdefs/threads.h b/cpukit/include/rtems/confdefs/threads.h
> >> index 97508068e2..a9c8a271b5 100644
> >> --- a/cpukit/include/rtems/confdefs/threads.h
> >> +++ b/cpukit/include/rtems/confdefs/threads.h
> >> @@ -138,8 +138,14 @@ typedef union {
> >>
> >>   const size_t _Thread_Maximum_name_size = CONFIGURE_MAXIMUM_THREAD_NAME_SIZE;
> >>
> >> +#define _CONFIGURE_ASSERT_TASK_STORAGE_ALIGNMENT( _value ) \
> >> +  ( ( _value ) % RTEMS_TASK_STORAGE_ALIGNMENT == 0 ? ( _value ) : \
> >> +    sizeof( int[ ( _value ) % RTEMS_TASK_STORAGE_ALIGNMENT == 0 ? 1 : -1 ] ) )
> >> +
> > The name of this is misleading as it is not an "assert" statement.
> > perhaps ENFORCE instead of ASSERT?
>
> This is a static initializer assertion similar to:
>
> #define _CONFIGURE_ASSERT_NOT_NULL( _type, _value ) \
>    ( ( _value ) != NULL ? ( _value ) : \
>      ( _type ) sizeof( int[ ( _value ) != NULL ? 1 : -1 ] ) )
>
> I can add a small comment to explain the new macro.
>
Ok thanks

> --
> embedded brains GmbH
> 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/
>


More information about the devel mailing list