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.
This commit is contained in:
Rich Felker
2014-06-10 04:02:40 -04:00
parent 64e32287f9
commit df15168cf8
11 changed files with 12 additions and 12 deletions

View File

@ -58,7 +58,7 @@ static void cancel_handler(int sig, siginfo_t *si, void *ctx)
void __testcancel()
{
if (!libc.has_thread_pointer) return;
pthread_t self = pthread_self();
pthread_t self = __pthread_self();
if (self->cancel && !self->canceldisable)
__cancel();
}