musl - musl - an implementation of the standard library for Linux-based systems

index : musl
musl - an implementation of the standard library for Linux-based systems
summary refs log tree commit diff
path: root/src/stdio/ftrylockfile.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/stdio/ftrylockfile.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/stdio/ftrylockfile.c')
-rw-r--r--src/stdio/ftrylockfile.c 2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/stdio/ftrylockfile.c b/src/stdio/ftrylockfile.c
index eef4e250..56cccafd 100644
--- a/src/stdio/ftrylockfile.c
+++ b/src/stdio/ftrylockfile.c
@@ -4,7 +4,7 @@
int ftrylockfile(FILE *f)
{
- int tid = pthread_self()->tid;
+ int tid = __pthread_self()->tid;
if (f->lock == tid) {
if (f->lockcount == LONG_MAX)
return -1;
generated by cgit v1.2.1 (git 2.18.0) at 2025年09月12日 02:37:32 +0000

AltStyle によって変換されたページ (->オリジナル) /