Sign in
fuchsia
/
fuchsia
/
83854f31e881f0f9aa2bd848a84a94e01fb09dd9
/
.
/
zircon
/
third_party
/
ulib
/
musl
/
src
/
thread
/
tss_set.c
blob: e0e14349343c06a38c4a09e628d865f617562d93 [
file
] [
log
] [
blame
]
#include
<threads.h>
#include
"threads_impl.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
;
}