mirror of
git://repo.or.cz/tinycc.git
synced 2026-11-04 21:26:36 +08:00
Also:
- arm64-gen.c: cleanup load/store
fixes a problem with bound-check test1b with
./configure --cc=tcc
Also, do not use 'long' or 'ul' suffix in tcc because
for example on win32-arm64
(uint64_t) ~0xffful == 0x00000000fffff000
but on linux-arm64
(uint64_t) ~0xffful == 0xfffffffffffff000
Also:
- tccpe.c: cleanup "quoted dll nanes in def" parse
- tests2: enable some threaded tests on windows
23 lines
460 B
C
23 lines
460 B
C
#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
|