summaryrefslogtreecommitdiff
path: root/src/thread/pthread_create.c
diff options
context:
space:
mode:
authorRich Felker <dalias@aerifal.cx>2024-07-24 12:41:04 -0400
committerRich Felker <dalias@aerifal.cx>2024-07-24 12:56:01 -0400
commitcde213f9c3ac1aa168581222edee6a6642113323 (patch)
tree05e0294a3cd0257b7a9c8b8ac4deab18934ee411 /src/thread/pthread_create.c
parent9ee6f104075fa6c37bb57a4ef406f3ff290b586c (diff)
downloadmusl-cde213f9c3ac1aa168581222edee6a6642113323.tar.gz
timer_create: replace pthread barrier with semaphores for thread start
our pthread barrier implementation reportedly has bugs that are could lead to malfunction or crash in timer_create. while this has not been reviewed to confirm, there have been past reports of pthread barrier bugs, and it seems likely that something is actually wrong. pthread barriers are an obscure primitive, and timer_create is the only place we are using them internally at present. even if they were working correctly, this means we are imposing linking of otherwise likely-dead code whenever timer_create is used. a pair of semaphores functions identically to a 2-waiter barrier except for destruction order properties. since the parent is responsible for the argument structure (including semaphores) lifetimes, the last operation on them in the timer thread must be posting to the parent.
Diffstat (limited to 'src/thread/pthread_create.c')
0 files changed, 0 insertions, 0 deletions