summaryrefslogtreecommitdiff
path: root/src/thread/pthread_create.c
diff options
context:
space:
mode:
authorRich Felker <dalias@aerifal.cx>2014-06-10 04:02:40 -0400
committerRich Felker <dalias@aerifal.cx>2014-06-10 04:02:40 -0400
commitdf15168cf8baf34fb9c94e19eaa1a5c79c853970 (patch)
tree83a61274604cb4b4ed65e617d03d687666cb84c3 /src/thread/pthread_create.c
parent64e32287f9d8a84217834bcc3387e9431cad9e4c (diff)
downloadmusl-df15168cf8baf34fb9c94e19eaa1a5c79c853970.tar.gz
replace all remaining internal uses of pthread_self with __pthread_self
prior to version 1.1.0, the difference between pthread_self (the public function) and __pthread_self (the internal macro or inline function) was that the former would lazily initialize the thread pointer if it was not already initialized, whereas the latter would crash in this case. since lazy initialization is no longer supported, use of pthread_self no longer makes sense; it simply generates larger, slower code.
Diffstat (limited to 'src/thread/pthread_create.c')
-rw-r--r--src/thread/pthread_create.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/thread/pthread_create.c b/src/thread/pthread_create.c
index e0b5ef16..7a2f172c 100644
--- a/src/thread/pthread_create.c
+++ b/src/thread/pthread_create.c
@@ -13,7 +13,7 @@ weak_alias(dummy_0, __pthread_tsd_run_dtors);
_Noreturn void pthread_exit(void *result)
{
- pthread_t self = pthread_self();
+ pthread_t self = __pthread_self();
sigset_t set;
self->result = result;
@@ -78,7 +78,7 @@ _Noreturn void pthread_exit(void *result)
void __do_cleanup_push(struct __ptcb *cb)
{
if (!libc.has_thread_pointer) return;
- struct pthread *self = pthread_self();
+ struct pthread *self = __pthread_self();
cb->__next = self->cancelbuf;
self->cancelbuf = cb;
}