mirror of
https://github.com/fluencelabs/musl
synced 2025-06-30 07:02:41 +00:00
use weak symbols for the POSIX functions that will be used by C threads
The intent of this is to avoid name space pollution of the C threads implementation. This has two sides to it. First we have to provide symbols that wouldn't pollute the name space for the C threads implementation. Second we have to clean up some internal uses of POSIX functions such that they don't implicitly drag in such symbols.
This commit is contained in:
committed by
Rich Felker
parent
6eb19505bc
commit
df7d0dfb9c
@ -6,7 +6,7 @@ static void undo(void *control)
|
||||
__wake(control, 1, 1);
|
||||
}
|
||||
|
||||
int pthread_once(pthread_once_t *control, void (*init)(void))
|
||||
int __pthread_once(pthread_once_t *control, void (*init)(void))
|
||||
{
|
||||
static int waiters;
|
||||
|
||||
@ -34,3 +34,5 @@ int pthread_once(pthread_once_t *control, void (*init)(void))
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
weak_alias(__pthread_once, pthread_once);
|
||||
|
Reference in New Issue
Block a user