This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[PATCH 3.3] fix ada/10546
- From: Laurent Guerby <guerby at acm dot org>
- To: gcc-patches at gcc dot gnu dot org
- Cc: Arnaud Charlet <charlet at ACT-Europe dot FR>
- Date: 30 Apr 2003 00:50:44 +0200
- Subject: [PATCH 3.3] fix ada/10546
- Organization:
This has been tested (boostrap + ACATS) on a Red Hat Linux 9 system
with glibc 2.3.2 / libpthread-0.10 and under a Debian system with
glibc 2.2.5 / libpthread-0.9, I also checked bits/pthreadtypes.h
and they had a different pthread_cond_t definition.
Identical ACATS results.
Ok to commit on 3.3? HEAD will take the fix from ACT
with the merge.
Thanks to Roch for providing me access to his machine.
2003-04-30 Laurent Guerby <guerby@acm.org>
PR ada/10546
* 5iosinte.ads: Increase pthread_cond_t size to match recent
LinuxThread and NPTL version.
Index: 5iosinte.ads
===================================================================
RCS file: /cvsroot/gcc/gcc/gcc/ada/5iosinte.ads,v
retrieving revision 1.4
diff -u -r1.4 5iosinte.ads
--- 5iosinte.ads 23 Oct 2002 07:33:20 -0000 1.4
+++ 5iosinte.ads 29 Apr 2003 22:37:48 -0000
@@ -444,11 +444,8 @@
private
- type sigset_t is array (0 .. 31) of unsigned_long;
+ type sigset_t is array (0 .. 127) of unsigned_char;
pragma Convention (C, sigset_t);
- for sigset_t'Size use 1024;
- -- This is for GNU libc version 2 but should be backward compatible with
- -- other libc where sigset_t is smaller.
type pid_t is new int;
@@ -477,7 +474,7 @@
stackaddr : System.Address;
stacksize : size_t;
end record;
- pragma Convention (C_Pass_By_Copy, pthread_attr_t);
+ pragma Convention (C, pthread_attr_t);
type pthread_condattr_t is record
dummy : int;
@@ -491,24 +488,28 @@
type pthread_t is new unsigned_long;
- type struct_pthread_queue is record
- head : System.Address;
- tail : System.Address;
+ type struct_pthread_fast_lock is record
+ status : long;
+ spinlock : int;
end record;
- pragma Convention (C, struct_pthread_queue);
+ pragma Convention (C, struct_pthread_fast_lock);
type pthread_mutex_t is record
- m_spinlock : int;
+ m_reserved : int;
m_count : int;
m_owner : System.Address;
m_kind : int;
- m_waiting : struct_pthread_queue;
+ m_lock : struct_pthread_fast_lock;
end record;
pragma Convention (C, pthread_mutex_t);
+ type pthread_cond_padding_t is array (0 .. 35) of unsigned_char;
+ pragma Convention (C, pthread_cond_padding_t);
+
type pthread_cond_t is record
- c_spinlock : int;
- c_waiting : struct_pthread_queue;
+ c_lock : struct_pthread_fast_lock;
+ c_waiting : System.Address;
+ c_padding : pthread_cond_padding_t;
end record;
pragma Convention (C, pthread_cond_t);