mirror of
https://github.com/ziglang/zig.git
synced 2025-12-27 08:33:15 +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
315 B
C
Vendored
13 lines
315 B
C
Vendored
#include "pthread_impl.h"
|
|
#include <threads.h>
|
|
|
|
int thrd_create(thrd_t *thr, thrd_start_t func, void *arg)
|
|
{
|
|
int ret = __pthread_create(thr, __ATTRP_C11_THREAD, (void *(*)(void *))func, arg);
|
|
switch (ret) {
|
|
case 0: return thrd_success;
|
|
case EAGAIN: return thrd_nomem;
|
|
default: return thrd_error;
|
|
}
|
|
}
|