projects
/
musl
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
remove unused SIGTIMER handler in timer_create
[musl]
/
src
/
thread
/
pthread_once.c
diff --git
a/src/thread/pthread_once.c
b/src/thread/pthread_once.c
index
df655ef
..
8e8d40a
100644
(file)
--- a/
src/thread/pthread_once.c
+++ b/
src/thread/pthread_once.c
@@
-8,7
+8,7
@@
static void undo(void *control)
__wake(control, -1, 1);
}
__wake(control, -1, 1);
}
-int __pthread_once_full(pthread_once_t *control, void (*init)(void))
+
hidden
int __pthread_once_full(pthread_once_t *control, void (*init)(void))
{
/* Try to enter initializing state. Four possibilities:
* 0 - we're the first or the other cancelled; run init
{
/* Try to enter initializing state. Four possibilities:
* 0 - we're the first or the other cancelled; run init
@@
-40,7
+40,7
@@
int __pthread_once(pthread_once_t *control, void (*init)(void))
{
/* Return immediately if init finished before, but ensure that
* effects of the init routine are visible to the caller. */
{
/* Return immediately if init finished before, but ensure that
* effects of the init routine are visible to the caller. */
- if (*control == 2) {
+ if (*
(volatile int *)
control == 2) {
a_barrier();
return 0;
}
a_barrier();
return 0;
}