aboutsummaryrefslogtreecommitdiff
path: root/gcc/gthr.h
diff options
context:
space:
mode:
authorChris Fairles <chris.fairles@gmail.com>2008-08-28 09:20:57 +0000
committerPaolo Carlini <paolo@gcc.gnu.org>2008-08-28 09:20:57 +0000
commita75150aea65b32e4d376a3e13b88d2db7bc04ab0 (patch)
tree0a423a203a6f7a1c8f373ea7dc554221dd2615db /gcc/gthr.h
parent0b45fd7ad2610727101fd43d07cbd8db13ef171a (diff)
downloadgcc-a75150aea65b32e4d376a3e13b88d2db7bc04ab0.zip
gcc-a75150aea65b32e4d376a3e13b88d2db7bc04ab0.tar.gz
gcc-a75150aea65b32e4d376a3e13b88d2db7bc04ab0.tar.bz2
gthr-posix.h (__gthread_create, [...]): New functions.
2008-08-28 Chris Fairles <chris.fairles@gmail.com> * gthr-posix.h (__gthread_create, __gthread_join, __gthread_detach, __gthread_mutex_timed_lock, __gthread_recursive_mutex_timed_lock, __gthread_cond_signal, __gthread_cond_timedwait, __gthread_cond_timedwait_recursive): New functions. * gthr-posix.c (pthread_mutex_timedlock, pthread_cond_timedwait): Likewise. * gthr.h: Comment on defining __GTHREADS_CXX0X macro in conforming thread interfaces. From-SVN: r139704
Diffstat (limited to 'gcc/gthr.h')
-rw-r--r--gcc/gthr.h31
1 files changed, 31 insertions, 0 deletions
diff --git a/gcc/gthr.h b/gcc/gthr.h
index a145ef1..d318256 100644
--- a/gcc/gthr.h
+++ b/gcc/gthr.h
@@ -104,12 +104,43 @@ Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA
All functions returning int should return zero on success or the error
number. If the operation is not supported, -1 is returned.
+ If the following are also defined, you should
+ #define __GTHREADS_CXX0X 1
+ to enable the c++0x thread library.
+
+ Types:
+ __gthread_t
+ __gthread_time_t
+
+ Interface:
+ int __gthread_create (__gthread_t *thread, void *(*func) (void*),
+ void *args);
+ int __gthread_join (__gthread_t thread, void **value_ptr);
+ int __gthread_detach (__gthread_t thread);
+ int __gthread_equal (__gthread_t t1, __gthread_t t2);
+ __gthread_t __gthread_self (void);
+ int __gthread_yield (void);
+
+ int __gthread_mutex_timedlock (__gthread_mutex_t *m,
+ const __gthread_time_t *abs_timeout);
+ int __gthread_recursive_mutex_timedlock (__gthread_recursive_mutex_t *m,
+ const __gthread_time_t *abs_time);
+
+ int __gthread_cond_signal (__gthread_cond_t *cond);
+ int __gthread_cond_timedwait (__gthread_cond_t *cond,
+ __gthread_mutex_t *mutex,
+ const __gthread_time_t *abs_timeout);
+ int __gthread_cond_timedwait_recursive (__gthread_cond_t *cond,
+ __gthread_recursive_mutex_t *mutex,
+ const __gthread_time_t *abs_time)
+
Currently supported threads packages are
TPF threads with -D__tpf__
POSIX/Unix98 threads with -D_PTHREADS
POSIX/Unix95 threads with -D_PTHREADS95
DCE threads with -D_DCE_THREADS
Solaris/UI threads with -D_SOLARIS_THREADS
+
*/
/* Check first for thread specific defines. */