summaryrefslogtreecommitdiff
path: root/threading_pthread.c
diff options
context:
space:
mode:
authorGravatar waker <wakeroid@gmail.com>2010-11-20 11:50:11 +0100
committerGravatar waker <wakeroid@gmail.com>2010-11-20 11:50:11 +0100
commit5a5025ff2086e01c2f0164d9c9bb1b3e20a279d1 (patch)
treeecdb74e123f1f32f993c0547368af6088a2fc310 /threading_pthread.c
parent21e46269269b82e756fef0051e0953c52d6be3ca (diff)
parent4f4cf2190aef650ad6e93a9ad86ed0207101f0a7 (diff)
Merge branch 'master' into static
Conflicts: plugins/artwork/artwork.c plugins/gtkui/coverart.c
Diffstat (limited to 'threading_pthread.c')
-rw-r--r--threading_pthread.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/threading_pthread.c b/threading_pthread.c
index 9b6cc277..0705128c 100644
--- a/threading_pthread.c
+++ b/threading_pthread.c
@@ -104,6 +104,21 @@ thread_join (intptr_t tid) {
return 0;
}
+int
+thread_detach (intptr_t tid) {
+ int s = pthread_detach ((pthread_t)tid);
+ if (s) {
+ fprintf (stderr, "pthread_detach failed: %s\n", strerror (s));
+ return -1;
+ }
+ return 0;
+}
+
+void
+thread_exit (void *retval) {
+ pthread_exit (retval);
+}
+
uintptr_t
mutex_create_nonrecursive (void) {
pthread_mutex_t *mtx = malloc (sizeof (pthread_mutex_t));