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;
}