diff options
author | Arnaud Charlet <charlet@gcc.gnu.org> | 2011-11-23 15:05:26 +0100 |
---|---|---|
committer | Arnaud Charlet <charlet@gcc.gnu.org> | 2011-11-23 15:05:26 +0100 |
commit | d0dcb2b1b9f1af8bb9be47c701c3d88f7513008b (patch) | |
tree | ff57b9487691cf2fb581fa1a9ad47d175aef9fc7 /gcc/ada/thread.c | |
parent | db3dd8af71808b993831ad6373b312b8fa9d4b50 (diff) | |
download | gcc-d0dcb2b1b9f1af8bb9be47c701c3d88f7513008b.zip gcc-d0dcb2b1b9f1af8bb9be47c701c3d88f7513008b.tar.gz gcc-d0dcb2b1b9f1af8bb9be47c701c3d88f7513008b.tar.bz2 |
[multiple changes]
2011-11-23 Thomas Quinot <quinot@adacore.com>
* thread.c, s-oscons-tmplt.c: Generate __gnat_pthread_condattr_setup
only on platforms where this is required, as determined by
s-oscons.h.
2011-11-23 Ed Schonberg <schonberg@adacore.com>
* sem_ch9.adb: No check on entry index if error on index.
2011-11-23 Gary Dismukes <dismukes@adacore.com>
* sem_ch6.adb (Analyze_Return_Statement): Improve error messages for
return statements nested inside an extended_return_statement.
* gcc-interface/Make-lang.in: Update dependencies.
* gcc-interface/Makefile.in (MISCLIB): Add -lutil for BSD targets.
From-SVN: r181670
Diffstat (limited to 'gcc/ada/thread.c')
-rw-r--r-- | gcc/ada/thread.c | 23 |
1 files changed, 15 insertions, 8 deletions
diff --git a/gcc/ada/thread.c b/gcc/ada/thread.c index da67f7b..a55acce 100644 --- a/gcc/ada/thread.c +++ b/gcc/ada/thread.c @@ -2,7 +2,7 @@ * * * GNAT COMPILER COMPONENTS * * * - * T H R E A D * + * P T H R E A D * * * * C Implementation File * * * @@ -31,20 +31,27 @@ /* This file provides utility functions to access the threads API */ -#include <pthread.h> -#include <time.h> #include "s-oscons.h" +#ifdef NEED_PTHREAD_CONDATTR_SETCLOCK +# include <pthread.h> +# include <time.h> + int __gnat_pthread_condattr_setup(pthread_condattr_t *attr) { /* * If using a clock other than CLOCK_REALTIME for the Ada Monotonic_Clock, * the corresponding clock id must be set for condition variables. - * There are no clock_id's on Darwin. */ -#if defined(__APPLE__) || ((CLOCK_RT_Ada) == (CLOCK_REALTIME)) - return 0; -#else return pthread_condattr_setclock (attr, CLOCK_RT_Ada); -#endif } + +#else + +int +__gnat_pthread_condattr_setup (void *attr) { + /* Dummy version for other platforms, which may or may not have pthread.h */ + return 0; +} + +#endif |