Re: [PATCH] Fix declaration of pthread-structs in s-osinte-rtems.ads (ada/68169)
On December 4, 2015 12:44:57 PM CST, Jeff Law wrote: >On 12/02/2015 03:23 PM, Jan Sommer wrote: >> Am Wednesday 02 December 2015, 08:13:20 schrieb Joel Sherrill: >>> >>> On December 2, 2015 2:14:22 AM EST, Jeff Law >>> wrote: On 12/01/2015 12:56 PM, Jan Sommer wrote: > Am Monday 30 November 2015, 16:19:30 schrieb Jeff Law: >> On 11/30/2015 03:06 PM, Jan Sommer wrote: >>> Could someone with write access please commit the patch? >>> The paperwork with the FSF has gone through. If something >>> else is missing, please tell me. >>> I won't be available next week. >> I'm not sure what you built your patches again, but I can't >> apply them >> to the trunk. Can you resend a patch as a diff against the >> trunk. >> >> Often I can fix things by hand, but this is Ada and I'd be >> much more likely to botch something. > > I updated the patches again. They should now fit with the heads > of the respective branches again. > Maybe the Changelog will be out of synch again. The patches are > for the following branches: ada-68169_4.9.diff --> > gcc-4_9-branch ada-68169_5.x.diff --> gcc-5-branch > ada-68169_trunk.diff --> trunk > > Let me know if they apply this time. I used svn diff to create > them and used patch -p0 to test if they apply locally. THanks. I've committed this to the trunk based on Joel's comments. The gcc-5 branch is frozen for the upcoming release and gcc-4.9 is regression/doc fixes only. It'll be up to the release managers whether or not to backport to those branches. >>> >>> Thanks Jeff. >>> >>> I would consider this a regression. RTEMS changed the >>> pthread_attr_t when we added thread affinity and updating Ada to >>> match slipped through. We knew it needed attention for SMP but >>> missed this critical piece to keep it working. >OK. I wasn't aware of this. Given this note, I went ahead and >committed the change to the gcc-5 and gcc-4.9 branches. However, it >missed the deadline for 5.3, which went out earlier this morning. Thanks. Releases and freezes happen independent of bugs being discovered and fixed. We all just have to keep plugging on and patching. We just like to build tools with released versions and as few patches as possible. That's all we can strive for. >Jeff --joel
Re: [PATCH] Fix declaration of pthread-structs in s-osinte-rtems.ads (ada/68169)
On 12/02/2015 03:23 PM, Jan Sommer wrote: Am Wednesday 02 December 2015, 08:13:20 schrieb Joel Sherrill: On December 2, 2015 2:14:22 AM EST, Jeff Law wrote: On 12/01/2015 12:56 PM, Jan Sommer wrote: Am Monday 30 November 2015, 16:19:30 schrieb Jeff Law: On 11/30/2015 03:06 PM, Jan Sommer wrote: Could someone with write access please commit the patch? The paperwork with the FSF has gone through. If something else is missing, please tell me. I won't be available next week. I'm not sure what you built your patches again, but I can't apply them to the trunk. Can you resend a patch as a diff against the trunk. Often I can fix things by hand, but this is Ada and I'd be much more likely to botch something. I updated the patches again. They should now fit with the heads of the respective branches again. Maybe the Changelog will be out of synch again. The patches are for the following branches: ada-68169_4.9.diff --> gcc-4_9-branch ada-68169_5.x.diff --> gcc-5-branch ada-68169_trunk.diff --> trunk Let me know if they apply this time. I used svn diff to create them and used patch -p0 to test if they apply locally. THanks. I've committed this to the trunk based on Joel's comments. The gcc-5 branch is frozen for the upcoming release and gcc-4.9 is regression/doc fixes only. It'll be up to the release managers whether or not to backport to those branches. Thanks Jeff. I would consider this a regression. RTEMS changed the pthread_attr_t when we added thread affinity and updating Ada to match slipped through. We knew it needed attention for SMP but missed this critical piece to keep it working. OK. I wasn't aware of this. Given this note, I went ahead and committed the change to the gcc-5 and gcc-4.9 branches. However, it missed the deadline for 5.3, which went out earlier this morning. Jeff
Re: [PATCH] Fix declaration of pthread-structs in s-osinte-rtems.ads (ada/68169)
Am Wednesday 02 December 2015, 08:13:20 schrieb Joel Sherrill: > > On December 2, 2015 2:14:22 AM EST, Jeff Law wrote: > >On 12/01/2015 12:56 PM, Jan Sommer wrote: > >> Am Monday 30 November 2015, 16:19:30 schrieb Jeff Law: > >>> On 11/30/2015 03:06 PM, Jan Sommer wrote: > Could someone with write access please commit the patch? > The paperwork with the FSF has gone through. If something else is > >missing, please tell me. > I won't be available next week. > >>> I'm not sure what you built your patches again, but I can't apply > >them > >>> to the trunk. Can you resend a patch as a diff against the trunk. > >>> > >>> Often I can fix things by hand, but this is Ada and I'd be much more > >>> likely to botch something. > >> > >> I updated the patches again. They should now fit with the heads of > >the respective branches again. > >> Maybe the Changelog will be out of synch again. > >> The patches are for the following branches: > >> ada-68169_4.9.diff --> gcc-4_9-branch > >> ada-68169_5.x.diff --> gcc-5-branch > >> ada-68169_trunk.diff --> trunk > >> > >> Let me know if they apply this time. I used svn diff to create them > >and used patch -p0 to test if they apply locally. > >THanks. I've committed this to the trunk based on Joel's comments. > > > >The gcc-5 branch is frozen for the upcoming release and gcc-4.9 is > >regression/doc fixes only. It'll be up to the release managers whether > > > >or not to backport to those branches. > > Thanks Jeff. > > I would consider this a regression. RTEMS changed the pthread_attr_t when we > added thread affinity and updating Ada to match slipped through. We knew it > needed attention for SMP but missed this critical piece to keep it working. > > Jan.. Is there a gcc PR for this? To get it on a release branch, it is better > to have one. > Yes, I created this one: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68169
Re: [PATCH] Fix declaration of pthread-structs in s-osinte-rtems.ads (ada/68169)
On December 2, 2015 2:14:22 AM EST, Jeff Law wrote: >On 12/01/2015 12:56 PM, Jan Sommer wrote: >> Am Monday 30 November 2015, 16:19:30 schrieb Jeff Law: >>> On 11/30/2015 03:06 PM, Jan Sommer wrote: Could someone with write access please commit the patch? The paperwork with the FSF has gone through. If something else is >missing, please tell me. I won't be available next week. >>> I'm not sure what you built your patches again, but I can't apply >them >>> to the trunk. Can you resend a patch as a diff against the trunk. >>> >>> Often I can fix things by hand, but this is Ada and I'd be much more >>> likely to botch something. >> >> I updated the patches again. They should now fit with the heads of >the respective branches again. >> Maybe the Changelog will be out of synch again. >> The patches are for the following branches: >> ada-68169_4.9.diff --> gcc-4_9-branch >> ada-68169_5.x.diff --> gcc-5-branch >> ada-68169_trunk.diff --> trunk >> >> Let me know if they apply this time. I used svn diff to create them >and used patch -p0 to test if they apply locally. >THanks. I've committed this to the trunk based on Joel's comments. > >The gcc-5 branch is frozen for the upcoming release and gcc-4.9 is >regression/doc fixes only. It'll be up to the release managers whether > >or not to backport to those branches. Thanks Jeff. I would consider this a regression. RTEMS changed the pthread_attr_t when we added thread affinity and updating Ada to match slipped through. We knew it needed attention for SMP but missed this critical piece to keep it working. Jan.. Is there a gcc PR for this? To get it on a release branch, it is better to have one. >Thanks. > >Jeff --joel
Re: [PATCH] Fix declaration of pthread-structs in s-osinte-rtems.ads (ada/68169)
On 12/01/2015 12:56 PM, Jan Sommer wrote: Am Monday 30 November 2015, 16:19:30 schrieb Jeff Law: On 11/30/2015 03:06 PM, Jan Sommer wrote: Could someone with write access please commit the patch? The paperwork with the FSF has gone through. If something else is missing, please tell me. I won't be available next week. I'm not sure what you built your patches again, but I can't apply them to the trunk. Can you resend a patch as a diff against the trunk. Often I can fix things by hand, but this is Ada and I'd be much more likely to botch something. I updated the patches again. They should now fit with the heads of the respective branches again. Maybe the Changelog will be out of synch again. The patches are for the following branches: ada-68169_4.9.diff --> gcc-4_9-branch ada-68169_5.x.diff --> gcc-5-branch ada-68169_trunk.diff --> trunk Let me know if they apply this time. I used svn diff to create them and used patch -p0 to test if they apply locally. THanks. I've committed this to the trunk based on Joel's comments. The gcc-5 branch is frozen for the upcoming release and gcc-4.9 is regression/doc fixes only. It'll be up to the release managers whether or not to backport to those branches. Thanks. Jeff
Re: [PATCH] Fix declaration of pthread-structs in s-osinte-rtems.ads (ada/68169)
Am Monday 30 November 2015, 16:19:30 schrieb Jeff Law: > On 11/30/2015 03:06 PM, Jan Sommer wrote: > > Could someone with write access please commit the patch? > > The paperwork with the FSF has gone through. If something else is missing, > > please tell me. > > I won't be available next week. > I'm not sure what you built your patches again, but I can't apply them > to the trunk. Can you resend a patch as a diff against the trunk. > > Often I can fix things by hand, but this is Ada and I'd be much more > likely to botch something. I updated the patches again. They should now fit with the heads of the respective branches again. Maybe the Changelog will be out of synch again. The patches are for the following branches: ada-68169_4.9.diff --> gcc-4_9-branch ada-68169_5.x.diff --> gcc-5-branch ada-68169_trunk.diff --> trunk Let me know if they apply this time. I used svn diff to create them and used patch -p0 to test if they apply locally. Thank you, Jan > > > jeff > > Index: gcc/ada/ChangeLog === --- gcc/ada/ChangeLog (Revision 231125) +++ gcc/ada/ChangeLog (Arbeitskopie) @@ -1,3 +1,9 @@ +2015-12-01 Jan Sommer + + * s-oscons-tmplt.c: Generate pthread constants for RTEMS + * s-osinte-rtems.ads: Declare pthread structs as opaque types in Ada + Fixes PR ada/68169 + 2015-11-29 Matthias Klose PR ada/68564 Index: gcc/ada/s-oscons-tmplt.c === --- gcc/ada/s-oscons-tmplt.c (Revision 231125) +++ gcc/ada/s-oscons-tmplt.c (Arbeitskopie) @@ -154,7 +154,7 @@ pragma Style_Checks ("M32766"); # include <_types.h> #endif -#ifdef __linux__ +#if defined (__linux__) || defined (__rtems__) # include # include #endif @@ -1441,7 +1441,8 @@ CND(CLOCK_THREAD_CPUTIME_ID, "Thread CPU clock") CNS(CLOCK_RT_Ada, "") #endif -#if defined (__APPLE__) || defined (__linux__) || defined (DUMMY) +#if defined (__APPLE__) || defined (__linux__) || defined (__rtems__) || \ + defined (DUMMY) /* -- Sizes of pthread data types @@ -1484,7 +1485,7 @@ CND(PTHREAD_RWLOCKATTR_SIZE, "pthread_rwlockattr_t CND(PTHREAD_RWLOCK_SIZE, "pthread_rwlock_t") CND(PTHREAD_ONCE_SIZE, "pthread_once_t") -#endif /* __APPLE__ || __linux__ */ +#endif /* __APPLE__ || __linux__ || __rtems__*/ /* Index: gcc/ada/s-osinte-rtems.ads === --- gcc/ada/s-osinte-rtems.ads (Revision 231125) +++ gcc/ada/s-osinte-rtems.ads (Arbeitskopie) @@ -51,6 +51,8 @@ -- It is designed to be a bottom-level (leaf) package. with Interfaces.C; +with System.OS_Constants; + package System.OS_Interface is pragma Preelaborate; @@ -60,6 +62,7 @@ package System.OS_Interface is subtype rtems_id is Interfaces.C.unsigned; subtype intis Interfaces.C.int; + subtype char is Interfaces.C.char; subtype short is Interfaces.C.short; subtype long is Interfaces.C.long; subtype unsigned is Interfaces.C.unsigned; @@ -68,7 +71,6 @@ package System.OS_Interface is subtype unsigned_char is Interfaces.C.unsigned_char; subtype plain_char is Interfaces.C.plain_char; subtype size_t is Interfaces.C.size_t; - --- -- Errno -- --- @@ -76,11 +78,11 @@ package System.OS_Interface is function errno return int; pragma Import (C, errno, "__get_errno"); - EAGAIN: constant := 11; - EINTR : constant := 4; - EINVAL: constant := 22; - ENOMEM: constant := 12; - ETIMEDOUT : constant := 116; + EAGAIN: constant := System.OS_Constants.EAGAIN; + EINTR : constant := System.OS_Constants.EINTR; + EINVAL: constant := System.OS_Constants.EINVAL; + ENOMEM: constant := System.OS_Constants.ENOMEM; + ETIMEDOUT : constant := System.OS_Constants.ETIMEDOUT; - -- Signals -- @@ -448,6 +450,7 @@ package System.OS_Interface is ss_low_priority : int; ss_replenish_period : timespec; ss_initial_budget : timespec; + sched_ss_max_repl : int; end record; pragma Convention (C, struct_sched_param); @@ -621,43 +624,34 @@ private end record; pragma Convention (C, timespec); - CLOCK_REALTIME : constant clockid_t := 1; - CLOCK_MONOTONIC : constant clockid_t := 4; + CLOCK_REALTIME : constant clockid_t := System.OS_Constants.CLOCK_REALTIME; + CLOCK_MONOTONIC : constant clockid_t := System.OS_Constants.CLOCK_MONOTONIC; + subtype char_array is Interfaces.C.char_array; + type pthread_attr_t is record - is_initialized : int; - stackaddr : System.Address; - stacksize : int; - contentionscope : int; - inheritsched: int; - schedpolicy : int; - schedparam : struct_sched_param; - cputime_clocked_allowed : int; - detatchstate: int; + Data : char_array (1 ..
Re: [PATCH] Fix declaration of pthread-structs in s-osinte-rtems.ads (ada/68169)
On 11/30/2015 03:06 PM, Jan Sommer wrote: Could someone with write access please commit the patch? The paperwork with the FSF has gone through. If something else is missing, please tell me. I won't be available next week. I'm not sure what you built your patches again, but I can't apply them to the trunk. Can you resend a patch as a diff against the trunk. Often I can fix things by hand, but this is Ada and I'd be much more likely to botch something. jeff
Re: [PATCH] Fix declaration of pthread-structs in s-osinte-rtems.ads (ada/68169)
Could someone with write access please commit the patch? The paperwork with the FSF has gone through. If something else is missing, please tell me. I won't be available next week. Best regards, Jan Am Tuesday 24 November 2015, 08:47:49 schrieb Jan Sommer: > It has gone through. > That was why I resubmitted the patch. > Joel can confirm. Apparently he is on a respective list and saw my paperwork > being cleared. > > Best regards, > >Jan > > Am Tuesday 24 November 2015, 07:45:30 schrieb Sebastian Huber: > > Hello Jan, > > > > On 23/11/15 23:15, Jan Sommer wrote: > > > If someone with commit rights could check and push the patches we might > > > get it into the next release. > > > > what is the status of your copyright assignment to the FSF which is > > required to integrate changes into GCC? > > > > > > ___ > devel mailing list > de...@rtems.org > http://lists.rtems.org/mailman/listinfo/devel
[PATCH] Fix declaration of pthread-structs in s-osinte-rtems.ads (ada/68169)
Just noticed that I forgot to crosspost this mail to the rtems-devel list. If someone with commit rights could check and push the patches we might get it into the next release. Cheers, Jan--- Begin Message --- Hello, The paperwork seems to have gone through. Here is the patch again for the 4.9.x, 5.x and trunk respectively. I just pulled the head of the corresponding branches and created a new diff, so it should apply properly. Best regards, JanIndex: gcc/ada/ChangeLog === --- gcc/ada/ChangeLog (Revision 230563) +++ gcc/ada/ChangeLog (Arbeitskopie) @@ -1,3 +1,9 @@ +2015-11-18 Jan Sommer + + * s-oscons-tmplt.c: Generate pthread constants for RTEMS + * s-osinte-rtems.ads: Declare pthread structs as opaque types in Ada + Fixes PR ada/68169 + 2015-10-09 Eric Botcazou * gcc-interface/Make-lang.in: Make sure that GNAT1_OBJS and not just Index: gcc/ada/s-oscons-tmplt.c === --- gcc/ada/s-oscons-tmplt.c (Revision 230563) +++ gcc/ada/s-oscons-tmplt.c (Arbeitskopie) @@ -154,7 +154,7 @@ pragma Style_Checks ("M32766"); # include <_types.h> #endif -#ifdef __linux__ +#if defined (__linux__) || defined (__rtems__) # include # include #endif @@ -1441,7 +1441,8 @@ CND(CLOCK_THREAD_CPUTIME_ID, "Thread CPU clock") CNS(CLOCK_RT_Ada, "") #endif -#if defined (__APPLE__) || defined (__linux__) || defined (DUMMY) +#if defined (__APPLE__) || defined (__linux__) || defined (__rtems__) || \ + defined (DUMMY) /* -- Sizes of pthread data types @@ -1484,7 +1485,7 @@ CND(PTHREAD_RWLOCKATTR_SIZE, "pthread_rwlockattr_t CND(PTHREAD_RWLOCK_SIZE, "pthread_rwlock_t") CND(PTHREAD_ONCE_SIZE, "pthread_once_t") -#endif /* __APPLE__ || __linux__ */ +#endif /* __APPLE__ || __linux__ || __rtems__*/ /* Index: gcc/ada/s-osinte-rtems.ads === --- gcc/ada/s-osinte-rtems.ads (Revision 230563) +++ gcc/ada/s-osinte-rtems.ads (Arbeitskopie) @@ -51,6 +51,8 @@ -- It is designed to be a bottom-level (leaf) package. with Interfaces.C; +with System.OS_Constants; + package System.OS_Interface is pragma Preelaborate; @@ -60,6 +62,7 @@ package System.OS_Interface is subtype rtems_id is Interfaces.C.unsigned; subtype intis Interfaces.C.int; + subtype char is Interfaces.C.char; subtype short is Interfaces.C.short; subtype long is Interfaces.C.long; subtype unsigned is Interfaces.C.unsigned; @@ -68,7 +71,6 @@ package System.OS_Interface is subtype unsigned_char is Interfaces.C.unsigned_char; subtype plain_char is Interfaces.C.plain_char; subtype size_t is Interfaces.C.size_t; - --- -- Errno -- --- @@ -76,11 +78,11 @@ package System.OS_Interface is function errno return int; pragma Import (C, errno, "__get_errno"); - EAGAIN: constant := 11; - EINTR : constant := 4; - EINVAL: constant := 22; - ENOMEM: constant := 12; - ETIMEDOUT : constant := 116; + EAGAIN: constant := System.OS_Constants.EAGAIN; + EINTR : constant := System.OS_Constants.EINTR; + EINVAL: constant := System.OS_Constants.EINVAL; + ENOMEM: constant := System.OS_Constants.ENOMEM; + ETIMEDOUT : constant := System.OS_Constants.ETIMEDOUT; - -- Signals -- @@ -448,6 +450,7 @@ package System.OS_Interface is ss_low_priority : int; ss_replenish_period : timespec; ss_initial_budget : timespec; + sched_ss_max_repl : int; end record; pragma Convention (C, struct_sched_param); @@ -621,43 +624,34 @@ private end record; pragma Convention (C, timespec); - CLOCK_REALTIME : constant clockid_t := 1; - CLOCK_MONOTONIC : constant clockid_t := 4; + CLOCK_REALTIME : constant clockid_t := System.OS_Constants.CLOCK_REALTIME; + CLOCK_MONOTONIC : constant clockid_t := System.OS_Constants.CLOCK_MONOTONIC; + subtype char_array is Interfaces.C.char_array; + type pthread_attr_t is record - is_initialized : int; - stackaddr : System.Address; - stacksize : int; - contentionscope : int; - inheritsched: int; - schedpolicy : int; - schedparam : struct_sched_param; - cputime_clocked_allowed : int; - detatchstate: int; + 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.double'Alignment; type pthread_condattr_t is record - flags : int; - process_shared : int; + Data : char_array (1 .. OS_Constants.PTHREAD_CONDATTR_SIZE); end record; pragma Convention (C, pthread_condattr_t); + for pthread_condattr_t'Alignment use Interfaces.C.double'Alignment; type pthread_mutex
[PATCH] Fix declaration of pthread-structs in s-osinte-rtems.ads (ada/68169)
Hello, The paperwork seems to have gone through. Here is the patch again for the 4.9.x, 5.x and trunk respectively. I just pulled the head of the corresponding branches and created a new diff, so it should apply properly. Best regards, JanIndex: gcc/ada/ChangeLog === --- gcc/ada/ChangeLog (Revision 230563) +++ gcc/ada/ChangeLog (Arbeitskopie) @@ -1,3 +1,9 @@ +2015-11-18 Jan Sommer + + * s-oscons-tmplt.c: Generate pthread constants for RTEMS + * s-osinte-rtems.ads: Declare pthread structs as opaque types in Ada + Fixes PR ada/68169 + 2015-10-09 Eric Botcazou * gcc-interface/Make-lang.in: Make sure that GNAT1_OBJS and not just Index: gcc/ada/s-oscons-tmplt.c === --- gcc/ada/s-oscons-tmplt.c (Revision 230563) +++ gcc/ada/s-oscons-tmplt.c (Arbeitskopie) @@ -154,7 +154,7 @@ pragma Style_Checks ("M32766"); # include <_types.h> #endif -#ifdef __linux__ +#if defined (__linux__) || defined (__rtems__) # include # include #endif @@ -1441,7 +1441,8 @@ CND(CLOCK_THREAD_CPUTIME_ID, "Thread CPU clock") CNS(CLOCK_RT_Ada, "") #endif -#if defined (__APPLE__) || defined (__linux__) || defined (DUMMY) +#if defined (__APPLE__) || defined (__linux__) || defined (__rtems__) || \ + defined (DUMMY) /* -- Sizes of pthread data types @@ -1484,7 +1485,7 @@ CND(PTHREAD_RWLOCKATTR_SIZE, "pthread_rwlockattr_t CND(PTHREAD_RWLOCK_SIZE, "pthread_rwlock_t") CND(PTHREAD_ONCE_SIZE, "pthread_once_t") -#endif /* __APPLE__ || __linux__ */ +#endif /* __APPLE__ || __linux__ || __rtems__*/ /* Index: gcc/ada/s-osinte-rtems.ads === --- gcc/ada/s-osinte-rtems.ads (Revision 230563) +++ gcc/ada/s-osinte-rtems.ads (Arbeitskopie) @@ -51,6 +51,8 @@ -- It is designed to be a bottom-level (leaf) package. with Interfaces.C; +with System.OS_Constants; + package System.OS_Interface is pragma Preelaborate; @@ -60,6 +62,7 @@ package System.OS_Interface is subtype rtems_id is Interfaces.C.unsigned; subtype intis Interfaces.C.int; + subtype char is Interfaces.C.char; subtype short is Interfaces.C.short; subtype long is Interfaces.C.long; subtype unsigned is Interfaces.C.unsigned; @@ -68,7 +71,6 @@ package System.OS_Interface is subtype unsigned_char is Interfaces.C.unsigned_char; subtype plain_char is Interfaces.C.plain_char; subtype size_t is Interfaces.C.size_t; - --- -- Errno -- --- @@ -76,11 +78,11 @@ package System.OS_Interface is function errno return int; pragma Import (C, errno, "__get_errno"); - EAGAIN: constant := 11; - EINTR : constant := 4; - EINVAL: constant := 22; - ENOMEM: constant := 12; - ETIMEDOUT : constant := 116; + EAGAIN: constant := System.OS_Constants.EAGAIN; + EINTR : constant := System.OS_Constants.EINTR; + EINVAL: constant := System.OS_Constants.EINVAL; + ENOMEM: constant := System.OS_Constants.ENOMEM; + ETIMEDOUT : constant := System.OS_Constants.ETIMEDOUT; - -- Signals -- @@ -448,6 +450,7 @@ package System.OS_Interface is ss_low_priority : int; ss_replenish_period : timespec; ss_initial_budget : timespec; + sched_ss_max_repl : int; end record; pragma Convention (C, struct_sched_param); @@ -621,43 +624,34 @@ private end record; pragma Convention (C, timespec); - CLOCK_REALTIME : constant clockid_t := 1; - CLOCK_MONOTONIC : constant clockid_t := 4; + CLOCK_REALTIME : constant clockid_t := System.OS_Constants.CLOCK_REALTIME; + CLOCK_MONOTONIC : constant clockid_t := System.OS_Constants.CLOCK_MONOTONIC; + subtype char_array is Interfaces.C.char_array; + type pthread_attr_t is record - is_initialized : int; - stackaddr : System.Address; - stacksize : int; - contentionscope : int; - inheritsched: int; - schedpolicy : int; - schedparam : struct_sched_param; - cputime_clocked_allowed : int; - detatchstate: int; + 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.double'Alignment; type pthread_condattr_t is record - flags : int; - process_shared : int; + Data : char_array (1 .. OS_Constants.PTHREAD_CONDATTR_SIZE); end record; pragma Convention (C, pthread_condattr_t); + for pthread_condattr_t'Alignment use Interfaces.C.double'Alignment; type pthread_mutexattr_t is record - is_initialized : int; - process_shared : int; - prio_ceiling: int; - protocol: int; - mutex_type : int; - recursive : int; - end record; +