summaryrefslogtreecommitdiff
path: root/libc/misc/pthread
diff options
context:
space:
mode:
authorEric Andersen <andersen@codepoet.org>2006-12-07 23:24:02 +0000
committerEric Andersen <andersen@codepoet.org>2006-12-07 23:24:02 +0000
commit1478c2de052374c6356db5513749a144c13791b1 (patch)
tree3b22a3f8361f94c99508c497e240ecb71acf8641 /libc/misc/pthread
parent99d6c367c4820a072dc4ada51561df17e2093778 (diff)
Major cleanup of internal mutex locking. Be more consistant in how we do
things, and avoid potential deadlocks caused when a thread holding a uClibc internal lock get canceled and terminates without releasing the lock. This change also provides a single place, bits/uClibc_mutex.h, for thread libraries to modify to change all instances of internal locking.
Diffstat (limited to 'libc/misc/pthread')
-rw-r--r--libc/misc/pthread/weaks.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/libc/misc/pthread/weaks.c b/libc/misc/pthread/weaks.c
index 68b603cc5..1566846ca 100644
--- a/libc/misc/pthread/weaks.c
+++ b/libc/misc/pthread/weaks.c
@@ -30,11 +30,14 @@
static int __pthread_return_0 (void);
static int __pthread_return_0 (void) { return 0; }
+static void __pthread_return_void (void) { return; }
weak_alias (__pthread_return_0, __pthread_mutex_init)
weak_alias (__pthread_return_0, __pthread_mutex_lock)
weak_alias (__pthread_return_0, __pthread_mutex_trylock)
weak_alias (__pthread_return_0, __pthread_mutex_unlock)
+weak_alias (__pthread_return_void, _pthread_cleanup_push_defer)
+weak_alias (__pthread_return_void, _pthread_cleanup_pop_restore)
#ifdef __UCLIBC_HAS_THREADS_NATIVE__
weak_alias (__pthread_return_0, __pthread_mutexattr_init)
weak_alias (__pthread_return_0, __pthread_mutexattr_destroy)