fixes for compiling on windows (#4026)

This commit is contained in:
Tomáš Malý
2025-01-17 04:06:14 +01:00
committed by GitHub
parent 1ac62e1f22
commit ba75b8fd56
2 changed files with 24 additions and 14 deletions

View File

@ -11,9 +11,19 @@
#define NANOSECONDS_PER_TICK 100
#if WINAPI_PARTITION_DESKTOP
extern NTSTATUS
NtQueryTimerResolution(PULONG MinimumResolution, PULONG MaximumResolution,
PULONG CurrentResolution);
#ifndef __kernel_entry
#define __kernel_entry
#endif
#ifndef NTAPI
#define NTAPI
#endif
#ifndef _Out_
#define _Out_
#endif
extern __kernel_entry NTSTATUS NTAPI
NtQueryTimerResolution(_Out_ PULONG MinimumResolution,
_Out_ PULONG MaximumResolution,
_Out_ PULONG CurrentResolution);
#endif
static __wasi_errno_t

View File

@ -60,6 +60,17 @@ static DWORD thread_data_key;
static void(WINAPI *GetCurrentThreadStackLimits_Kernel32)(PULONG_PTR,
PULONG_PTR) = NULL;
int
os_sem_init(korp_sem *sem);
int
os_sem_destroy(korp_sem *sem);
int
os_sem_wait(korp_sem *sem);
int
os_sem_reltimed_wait(korp_sem *sem, uint64 useconds);
int
os_sem_signal(korp_sem *sem);
static void
thread_data_list_add(os_thread_data *thread_data)
{
@ -117,17 +128,6 @@ thread_data_list_lookup(korp_tid tid)
return NULL;
}
int
os_sem_init(korp_sem *sem);
int
os_sem_destroy(korp_sem *sem);
int
os_sem_wait(korp_sem *sem);
int
os_sem_reltimed_wait(korp_sem *sem, uint64 useconds);
int
os_sem_signal(korp_sem *sem);
int
os_thread_sys_init()
{