From 3fbf11ef2f391980d12b1049237c62493a4d1aad Mon Sep 17 00:00:00 2001 From: paolo Date: Thu, 28 Aug 2008 09:20:57 +0000 Subject: 2008-08-28 Chris Fairles * 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 --- gcc/gthr-posix.c | 35 +++++++++++++++++++++++++++++++++-- 1 file changed, 33 insertions(+), 2 deletions(-) (limited to 'gcc/gthr-posix.c') diff --git a/gcc/gthr-posix.c b/gcc/gthr-posix.c index e2d731ae407..bfcd316de30 100644 --- a/gcc/gthr-posix.c +++ b/gcc/gthr-posix.c @@ -75,6 +75,24 @@ pthread_create (pthread_t *thread ATTRIBUTE_UNUSED, return 0; } +int +pthread_join (pthread_t thread ATTRIBUTE_UNUSED, + void **value_ptr ATTRIBUTE_UNUSED) +{ + return 0; +} + +void +pthread_exit (void *value_ptr ATTRIBUTE_UNUSED) +{ +} + +int +pthread_detach (pthread_t thread ATTRIBUTE_UNUSED) +{ + return 0; +} + int pthread_cancel (pthread_t thread ATTRIBUTE_UNUSED) { @@ -93,6 +111,15 @@ pthread_mutex_trylock (pthread_mutex_t *mutex ATTRIBUTE_UNUSED) return 0; } +#ifdef _POSIX_TIMEOUTS +int +pthread_mutex_timedlock (pthread_mutex_t *mutex ATTRIBUTE_UNUSED, + const struct timespec *abs_timeout ATTRIBUTE_UNUSED) +{ + return 0; +} +#endif /* _POSIX_TIMEOUTS */ + int pthread_mutex_unlock (pthread_mutex_t *mutex ATTRIBUTE_UNUSED) { @@ -150,9 +177,12 @@ pthread_cond_wait (pthread_cond_t *cond ATTRIBUTE_UNUSED, return 0; } -void -pthread_exit (void *value_ptr ATTRIBUTE_UNUSED) +int +pthread_cond_timedwait (pthread_cond_t *cond ATTRIBUTE_UNUSED, + pthread_mutex_t *mutex ATTRIBUTE_UNUSED, + const struct timespec *abstime ATTRIBUTE_UNUSED) { + return 0; } int @@ -173,6 +203,7 @@ pthread_self (void) { return (pthread_t) 0; } + #ifdef _POSIX_PRIORITY_SCHEDULING #ifdef _POSIX_THREAD_PRIORITY_SCHEDULING int -- cgit v1.2.1