mirror of
https://github.com/ziglang/zig.git
synced 2025-12-22 06:03:16 +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
11 lines
335 B
C
Vendored
11 lines
335 B
C
Vendored
#include <threads.h>
|
|
#include <pthread.h>
|
|
|
|
int tss_create(tss_t *tss, tss_dtor_t dtor)
|
|
{
|
|
/* Different error returns are possible. C glues them together into
|
|
* just failure notification. Can't be optimized to a tail call,
|
|
* unless thrd_error equals EAGAIN. */
|
|
return __pthread_key_create(tss, dtor) ? thrd_error : thrd_success;
|
|
}
|