diff options
author | paolo <paolo@138bc75d-0d04-0410-961f-82ee72b054a4> | 2008-08-28 09:20:57 +0000 |
---|---|---|
committer | paolo <paolo@138bc75d-0d04-0410-961f-82ee72b054a4> | 2008-08-28 09:20:57 +0000 |
commit | 3fbf11ef2f391980d12b1049237c62493a4d1aad (patch) | |
tree | 0a423a203a6f7a1c8f373ea7dc554221dd2615db /gcc/gthr.h | |
parent | dc5e8aba5577c53811a823084e9738bfdfc7a192 (diff) | |
download | gcc-3fbf11ef2f391980d12b1049237c62493a4d1aad.tar.gz |
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.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@139704 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/gthr.h')
-rw-r--r-- | gcc/gthr.h | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/gcc/gthr.h b/gcc/gthr.h index a145ef1a9de..d318256429a 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. */ |