[PATCH] Export _NCPUWORDS as variable for access from within the gnat-rts

2015-10-29 Thread Jan Sommer
Hi, This patch will make the define _NCPUWORDS accessible for the ada runtime. It is necessary to model the pthread_attr_t implementation for rtems in Ada. We had a stack corruption because the C an Ada declarations of the type where out of synch. I will send the updated s-osinte-rtems.ads to

Re: [PATCH] Export _NCPUWORDS as variable for access from within the gnat-rts

2015-10-29 Thread Joel Sherrill
Sorry. I am trying to use j...@rtems.org more and this actually bounced from the rtems devel mailing list. I have a habit to break. :( On 10/29/2015 8:14 AM, Jan Sommer wrote: Hi, This patch will make the define _NCPUWORDS accessible for the ada runtime. It is necessary to model the pthread_at

Re: [PATCH] Export _NCPUWORDS as variable for access from within the gnat-rts

2015-10-29 Thread Jan Sommer
Am Thursday 29 October 2015, 08:45:57 schrieb Joel Sherrill: > > On 10/29/2015 8:14 AM, Jan Sommer wrote: > > Hi, > > > > This patch will make the define _NCPUWORDS accessible for the ada runtime. > > It is necessary to model the pthread_attr_t implementation for rtems in > > Ada. > > We had a

Re: [PATCH] Export _NCPUWORDS as variable for access from within the gnat-rts

2015-10-29 Thread Joel Sherrill
On 10/29/2015 9:20 AM, Jan Sommer wrote: Am Thursday 29 October 2015, 08:45:57 schrieb Joel Sherrill: On 10/29/2015 8:14 AM, Jan Sommer wrote: Hi, This patch will make the define _NCPUWORDS accessible for the ada runtime. It is necessary to model the pthread_attr_t implementation for rtems

[PATCH 2/2] Export _NCPUWORDS for Ada

2015-10-29 Thread Jan Sommer
Used in s-osinte-rtems.ads to model pthread_attr_t --- cpukit/libgnat/adasupp.c | 4 1 file changed, 4 insertions(+) diff --git a/cpukit/libgnat/adasupp.c b/cpukit/libgnat/adasupp.c index 662b1cc..cde36b6 100644 --- a/cpukit/libgnat/adasupp.c +++ b/cpukit/libgnat/adasupp.c @@ -10,6 +10,10 @@

[PATCH 1/2] Include stackimpl.h otherwise PTHREAD_MINIMUM_STACK_SIZE cannot be evaluated

2015-10-29 Thread Jan Sommer
--- cpukit/libgnat/adasupp.c | 1 + 1 file changed, 1 insertion(+) diff --git a/cpukit/libgnat/adasupp.c b/cpukit/libgnat/adasupp.c index a6e1f38..662b1cc 100644 --- a/cpukit/libgnat/adasupp.c +++ b/cpukit/libgnat/adasupp.c @@ -8,6 +8,7 @@ #include #include #include +#include /* * _a

[PATCH 2/2] Export _NCPUWORDS for Ada

2015-10-29 Thread Jan Sommer
_NCPUWORDS is defined in newlib in newlib/libc/sys/rtems/sys/cpuset.h and used to define the type cpu_set_t there. typedef struct _cpuset { cpu_set_word_t __bits[_NCPUWORDS]; } cpu_set_t; cpu_set_t is used for a field in the struct pthread_attr_t in file newlib/libc/include/types.h The Gnat Ad

[PATCH 1/2] Include stackimpl.h otherwise PTHREAD_MINIMUM_STACK_SIZE cannot be evaluated

2015-10-29 Thread Jan Sommer
--- cpukit/libgnat/adasupp.c | 1 + 1 file changed, 1 insertion(+) diff --git a/cpukit/libgnat/adasupp.c b/cpukit/libgnat/adasupp.c index a6e1f38..662b1cc 100644 --- a/cpukit/libgnat/adasupp.c +++ b/cpukit/libgnat/adasupp.c @@ -8,6 +8,7 @@ #include #include #include +#include /* * _a

Re: [PATCH 1/2] Include stackimpl.h otherwise PTHREAD_MINIMUM_STACK_SIZE cannot be evaluated

2015-10-29 Thread Sebastian Huber
I fixed the commit message and check it in on master and 4.11 branch. On 29/10/15 22:10, Jan Sommer wrote: --- cpukit/libgnat/adasupp.c | 1 + 1 file changed, 1 insertion(+) diff --git a/cpukit/libgnat/adasupp.c b/cpukit/libgnat/adasupp.c index a6e1f38..662b1cc 100644 --- a/cpukit/libgnat/ad

Re: [PATCH 2/2] Export _NCPUWORDS for Ada

2015-10-29 Thread 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. On 29/10/15 22:10, Jan Sommer wrote: _NCPUWORDS is defined in newlib in newlib/libc/sys/rte

Re: [PATCH 2/2] Export _NCPUWORDS for Ada

2015-10-29 Thread Sebastian Huber
On 30/10/15 07:50, Sebastian Huber wrote: 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. It would be good to have test cases that ensure