diff options
author | Chris Fairles <chris.fairles@gmail.com> | 2008-08-28 09:20:57 +0000 |
---|---|---|
committer | Paolo Carlini <paolo@gcc.gnu.org> | 2008-08-28 09:20:57 +0000 |
commit | a75150aea65b32e4d376a3e13b88d2db7bc04ab0 (patch) | |
tree | 0a423a203a6f7a1c8f373ea7dc554221dd2615db /gcc/gthr-posix.c | |
parent | 0b45fd7ad2610727101fd43d07cbd8db13ef171a (diff) | |
download | gcc-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-posix.c')
-rw-r--r-- | gcc/gthr-posix.c | 35 |
1 files changed, 33 insertions, 2 deletions
diff --git a/gcc/gthr-posix.c b/gcc/gthr-posix.c index e2d731ae..bfcd316 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 |