projects
/
musl
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
55e46a899378f4f896e570ad8edbacbe569cbcf8
[musl]
/
pthread_setspecific.c
1
#include "pthread_impl.h"
2
3
int pthread_setspecific(pthread_key_t k, const void *x)
4
{
5
struct pthread *self = __pthread_self();
6
/* Avoid unnecessary COW */
7
if (self->tsd[k] != x) {
8
self->tsd[k] = (void *)x;
9
self->tsd_used = 1;
10
}
11
return 0;
12
}