summaryrefslogtreecommitdiff
path: root/src/internal
diff options
context:
space:
mode:
authorRich Felker <dalias@aerifal.cx>2022-10-07 21:36:25 -0400
committerRich Felker <dalias@aerifal.cx>2022-10-19 14:01:32 -0400
commitcf76df0e1fe09b0d504ca650fdaa01df5bf9ab72 (patch)
tree6a3841d780547892c723d11221aaea3e5fa3f85c /src/internal
parent5ff3eea91fa6bdce25b3a35644433f68e076beca (diff)
downloadmusl-cf76df0e1fe09b0d504ca650fdaa01df5bf9ab72.tar.gz
fix missing synchronization of pthread TSD keys with MT-fork
commit 167390f05564e0a4d3fcb4329377fd7743267560 seems to have overlooked the presence of a lock here, probably because it was one of the exceptions not using LOCK() but a rwlock. as such, it can't be added to the generic table of locks to take, so add an explicit atfork function for the pthread keys table. the order it is called does not particularly matter since nothing else in libc but pthread_exit interacts with keys.
Diffstat (limited to 'src/internal')
-rw-r--r--src/internal/fork_impl.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/internal/fork_impl.h b/src/internal/fork_impl.h
index ae3a79e5..354e733b 100644
--- a/src/internal/fork_impl.h
+++ b/src/internal/fork_impl.h
@@ -16,3 +16,4 @@ extern hidden volatile int *const __vmlock_lockptr;
hidden void __malloc_atfork(int);
hidden void __ldso_atfork(int);
+hidden void __pthread_key_atfork(int);