summaryrefslogtreecommitdiff
path: root/gcc/gthr-posix.c
diff options
context:
space:
mode:
authorpaolo <paolo@138bc75d-0d04-0410-961f-82ee72b054a4>2008-08-28 09:20:57 +0000
committerpaolo <paolo@138bc75d-0d04-0410-961f-82ee72b054a4>2008-08-28 09:20:57 +0000
commit3fbf11ef2f391980d12b1049237c62493a4d1aad (patch)
tree0a423a203a6f7a1c8f373ea7dc554221dd2615db /gcc/gthr-posix.c
parentdc5e8aba5577c53811a823084e9738bfdfc7a192 (diff)
downloadgcc-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-posix.c')
-rw-r--r--gcc/gthr-posix.c35
1 files changed, 33 insertions, 2 deletions
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