aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada/thread.c
diff options
context:
space:
mode:
authorArnaud Charlet <charlet@gcc.gnu.org>2011-12-21 13:03:53 +0100
committerArnaud Charlet <charlet@gcc.gnu.org>2011-12-21 13:03:53 +0100
commitdea1d3dcea17dfb21bf403133dcc6acd0cad6c29 (patch)
treef290fe9b936622bd1e571848a07a44ee941fb7c7 /gcc/ada/thread.c
parent88115c2a3945dd9eaf0807385e1cd27c298d3d08 (diff)
downloadgcc-dea1d3dcea17dfb21bf403133dcc6acd0cad6c29.zip
gcc-dea1d3dcea17dfb21bf403133dcc6acd0cad6c29.tar.gz
gcc-dea1d3dcea17dfb21bf403133dcc6acd0cad6c29.tar.bz2
[multiple changes]
2011-12-21 Thomas Quinot <quinot@adacore.com> * thread.c, s-oscons-tmplt.c, init.c (pthread_condattr_setclock): For AIX 5.2, define as a dummy weak symbol in init.c. (CLOCK_RT_Ada): Set to CLOCK_MONOTONIC on all versions of AIX. 2011-12-21 Thomas Quinot <quinot@adacore.com> * snames.ads-tmpl, sem_ch8.adb: Minor reformatting. * sem_prag.adb: Minor comment clarification. 2011-12-21 Vincent Celier <celier@adacore.com> * prj-nmsc.adb (Report_No_Sources): New argument Lang for the language name as a Name_Id. Do not report no sources if language is not allowed. (Add_Source): Do not add source if language is not allowed. * prj.adb (Add_Restricted_Language): New procedure (Is_Allowed_Language): New function * prj.ads (Add_Restricted_Language): New procedure (Is_Allowed_Language): New function From-SVN: r182577
Diffstat (limited to 'gcc/ada/thread.c')
-rw-r--r--gcc/ada/thread.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/gcc/ada/thread.c b/gcc/ada/thread.c
index a55acce..87d7603 100644
--- a/gcc/ada/thread.c
+++ b/gcc/ada/thread.c
@@ -37,6 +37,21 @@
# include <pthread.h>
# include <time.h>
+#ifndef _AIXVERSION_530
+/* We use the same runtime library for AIX 5.2 and 5.3, but pthread_condattr_
+ * setclock exists only on the latter, so for the former provide a dummy
+ * implementation (declared below, weak symbol defined in init.c).
+ *
+ * Note: this means that under AIX 5.2 we'll be using CLOCK_MONOTONIC
+ * timestamps from clock_gettime() as arguments to pthread_cond_timedwait,
+ * which expects a CLOCK_REALTIME value, which is technically wrong, but
+ * inocuous in practice on that particular platform since both clocks happen
+ * to use close epochs.
+ */
+
+extern int pthread_condattr_setclock (pthread_condattr_t *attr, clockid_t cl);
+#endif
+
int
__gnat_pthread_condattr_setup(pthread_condattr_t *attr) {
/*