[PATCH 2/2] Export _NCPUWORDS for Ada

Sebastian Huber sebastian.huber at embedded-brains.de
Mon Nov 2 06:42:36 UTC 2015



On 30/10/15 19:02, Joel Sherrill wrote:
> On October 30, 2015 1:58:33 PM EDT, Jan Sommer<soja-lists at aries.uberspace.de>  wrote:
>> >Am Friday 30 October 2015, 10:07:45 schrieb Sebastian Huber:
>>> >>On 30/10/15 09:53, Jan Sommer wrote:
>>>> >> >Am Friday 30 October 2015, 07:50:16 schrieb Sebastian Huber:
>>>>>> >> >> >How is this tackled in the glibc/Linux support? Is the exact
>> >layout of
>>>>>> >> >> >the structures really interesting for Ada? I guess its sufficient
>> >to
>>>>>> >> >> >tell Ada the size and alignment of pthread_attr_t for example.
>>>>>> >> >> >
>>>> >> >In Linux they do it like this:
>>>> >> >     type pthread_attr_t is record
>>>> >> >        Data : char_array (1 .. OS_Constants.PTHREAD_ATTR_SIZE);
>>>> >> >     end record;
>>>> >> >     pragma Convention (C, pthread_attr_t);
>>>> >> >     for pthread_attr_t'Alignment use
>> >Interfaces.C.unsigned_long'Alignment;
>>>> >> >
>>>> >> >That's probably the best solution. The gnat-rts changes values of
>> >the fields only using the corresponding pthread_set functions.
>>>> >> >If no one objects I would try to change the osinte-rtems.ads in the
>> >same manner.
>>> >>
>>> >>This would be my preferred solution.
>>> >>
>>> >>
>> >
>> >Ok, I have made the changes locally now, but how do I submit them to
>> >gcc?
>> >Do I create patches only for gcc 4.9.x or do I need to get it into
>> >trunk and it gets backported?
>> >Their contribute page does not read as clear to me as the rtems one.
> I'm glad we have good instructions.:)
>
> Given we want this on 4.9 and forward, it needs a gcc PR. Then reference that in the ChangLog entry. There is a gcc list for patches. Send it there.
>
> Since this is RTEMS specific, Sebastian or I can commit it quickly.
>

Depending on the size of the patch and possible future patches we may 
need a copyright assignment with the FSF.

-- 
Sebastian Huber, embedded brains GmbH

Address : Dornierstr. 4, D-82178 Puchheim, Germany
Phone   : +49 89 189 47 41-16
Fax     : +49 89 189 47 41-09
E-Mail  : sebastian.huber at embedded-brains.de
PGP     : Public key available on request.

Diese Nachricht ist keine geschäftliche Mitteilung im Sinne des EHUG.



More information about the devel mailing list