mirror of https://git.musl-libc.org/git/musl
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
14 lines
246 B
14 lines
246 B
|
12 years ago
|
#include "pthread_impl.h"
|
||
|
|
#include <threads.h>
|
||
|
|
|
||
|
|
int tss_set(tss_t k, void *x)
|
||
|
|
{
|
||
|
|
struct pthread *self = __pthread_self();
|
||
|
|
/* Avoid unnecessary COW */
|
||
|
|
if (self->tsd[k] != x) {
|
||
|
|
self->tsd[k] = x;
|
||
|
|
self->tsd_used = 1;
|
||
|
|
}
|
||
|
|
return thrd_success;
|
||
|
|
}
|