22 lines · 460 B · C
RawDownload
#ifdef _WIN32#include <windows.h>typedef HANDLE pthread_t;int pthread_create(pthread_t *p, void *x, void *fn, void *args){    DWORD tid;    *p = CreateThread(NULL, 0, fn, args, 0, &tid);    return *p ? 0 : -1;}int pthread_join(pthread_t h, void **ret){    DWORD r;    WaitForSingleObject(h, INFINITE);    GetExitCodeThread(h, &r);    CloseHandle(h);    if (ret)        *ret = (void*)(size_t)r;    return 0;}#else#include <pthread.h>#endif

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t