repo.or.cz
/
musl.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
synccall: add separate exit_sem to fix thread release logic bug
[musl.git]
/
src
/
thread
/
tss_set.c
blob
70c4fb723cf68b6e37e43477ae8f17d6f6e63b1c
1
#include
"pthread_impl.h"
2
#include <threads.h>
3
4
int
tss_set
(
tss_t k
,
void
*
x
)
5
{
6
struct
pthread
*
self
=
__pthread_self
();
7
/* Avoid unnecessary COW */
8
if
(
self
->
tsd
[
k
] !=
x
) {
9
self
->
tsd
[
k
] =
x
;
10
self
->
tsd_used
=
1
;
11
}
12
return
thrd_success
;
13
}