mirror of
https://github.com/ziglang/zig.git
synced 2026-02-09 19:10:48 +00:00
also start prefering NtDll API. so far: * NtQueryInformationFile * NtClose adds a performance workaround for windows unicode conversion. but that should probably be removed before merging
13 lines
248 B
C
Vendored
13 lines
248 B
C
Vendored
#include "pthread_impl.h"
|
|
|
|
int pthread_setspecific(pthread_key_t k, const void *x)
|
|
{
|
|
struct pthread *self = __pthread_self();
|
|
/* Avoid unnecessary COW */
|
|
if (self->tsd[k] != x) {
|
|
self->tsd[k] = (void *)x;
|
|
self->tsd_used = 1;
|
|
}
|
|
return 0;
|
|
}
|