Sign in
fuchsia
/
zircon
/
/
13ee3dc5e4c46bf127977ad28645c47442ec517d
/
.
/
third_party
/
ulib
/
musl
/
src
/
thread
/
tss_set.c
blob: e3daa4116c8d1ab16e538195181b96417c3746d3 [
file
] [
log
] [
blame
]
#include
"threads_impl.h"
#include
<threads.h>
int
tss_set
(
tss_t
k
,
void
*
x
)
{
thrd_t
self
=
__thrd_current
();
/* Avoid unnecessary COW */
if
(
self
->
tsd
[
k
]
!=
x
)
{
self
->
tsd
[
k
]
=
x
;
self
->
tsd_used
=
1
;
}
return
thrd_success
;
}