summaryrefslogtreecommitdiffstats
path: root/libc/sysdeps/linux/common/bits/uClibc_pthread.h
diff options
context:
space:
mode:
author"Steven J. Hill" <sjhill@realitydiluted.com>2007-01-21 02:24:07 +0000
committer"Steven J. Hill" <sjhill@realitydiluted.com>2007-01-21 02:24:07 +0000
commitabfc5558bf4beb7dc381d93baaec4a9a3e4eba7b (patch)
tree8763531b221e50bbbafb457cc1688e9ab4175516 /libc/sysdeps/linux/common/bits/uClibc_pthread.h
parent293cef1de02c36f58a48bcdbe2d385059ea04828 (diff)
downloaduClibc-alpine-abfc5558bf4beb7dc381d93baaec4a9a3e4eba7b.tar.bz2
uClibc-alpine-abfc5558bf4beb7dc381d93baaec4a9a3e4eba7b.tar.xz
More merging from trunk.
Diffstat (limited to 'libc/sysdeps/linux/common/bits/uClibc_pthread.h')
-rw-r--r--libc/sysdeps/linux/common/bits/uClibc_pthread.h25
1 files changed, 19 insertions, 6 deletions
diff --git a/libc/sysdeps/linux/common/bits/uClibc_pthread.h b/libc/sysdeps/linux/common/bits/uClibc_pthread.h
index a3be2ca35..1d6209f5e 100644
--- a/libc/sysdeps/linux/common/bits/uClibc_pthread.h
+++ b/libc/sysdeps/linux/common/bits/uClibc_pthread.h
@@ -27,11 +27,24 @@
# error "Always include <pthread.h> rather than <bits/uClibc_pthread.h>"
#endif
-extern int __pthread_mutex_init (pthread_mutex_t *__restrict __mutex,
- __const pthread_mutexattr_t *__restrict
- __mutex_attr) attribute_hidden;
-extern int __pthread_mutex_trylock (pthread_mutex_t *__mutex) attribute_hidden;
-extern int __pthread_mutex_lock (pthread_mutex_t *__mutex) attribute_hidden;
-extern int __pthread_mutex_unlock (pthread_mutex_t *__mutex) attribute_hidden;
+#if defined _LIBC && (defined IS_IN_libc || defined NOT_IN_libc)
+/* Threading functions internal to uClibc. Make these thread functions
+ * weak so that we can elide them from single-threaded processes. */
+extern int weak_function __pthread_mutex_init (pthread_mutex_t *__mutex,
+ __const pthread_mutexattr_t *__mutex_attr);
+extern int weak_function __pthread_mutex_destroy (pthread_mutex_t *__mutex);
+extern int weak_function __pthread_mutex_lock (pthread_mutex_t *__mutex);
+extern int weak_function __pthread_mutex_unlock (pthread_mutex_t *__mutex);
+extern void __uclibc_mutex_unlock (void *) attribute_hidden;
+extern int weak_function __pthread_mutex_trylock (pthread_mutex_t *__mutex);
+# ifndef __UCLIBC_HAS_THREADS_NATIVE__
+extern void weak_function _pthread_cleanup_push_defer (
+ struct _pthread_cleanup_buffer *__buffer,
+ void (*__routine) (void *), void *__arg);
+extern void weak_function _pthread_cleanup_pop_restore (
+ struct _pthread_cleanup_buffer *__buffer,
+ int __execute);
+# endif
+#endif
#endif