fix windows compile error
parent
10800a009a
commit
bce084ac12
|
@ -51,6 +51,11 @@ u64 nano_count()
|
||||||
return count.QuadPart*(1000000000/frequency.QuadPart);
|
return count.QuadPart*(1000000000/frequency.QuadPart);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void sleep_nanos(u64 nsec)
|
||||||
|
{
|
||||||
|
Sleep((DWORD)(nsec/1000000));
|
||||||
|
}
|
||||||
|
|
||||||
LONG factor_vm::exception_handler(PEXCEPTION_POINTERS pe)
|
LONG factor_vm::exception_handler(PEXCEPTION_POINTERS pe)
|
||||||
{
|
{
|
||||||
PEXCEPTION_RECORD e = (PEXCEPTION_RECORD)pe->ExceptionRecord;
|
PEXCEPTION_RECORD e = (PEXCEPTION_RECORD)pe->ExceptionRecord;
|
||||||
|
|
|
@ -126,11 +126,6 @@ segment::~segment()
|
||||||
fatal_error("Segment deallocation failed",0);
|
fatal_error("Segment deallocation failed",0);
|
||||||
}
|
}
|
||||||
|
|
||||||
void sleep_nanos(u64 nsec)
|
|
||||||
{
|
|
||||||
Sleep((DWORD)(nsec/1000000));
|
|
||||||
}
|
|
||||||
|
|
||||||
long getpagesize()
|
long getpagesize()
|
||||||
{
|
{
|
||||||
static long g_pagesize = 0;
|
static long g_pagesize = 0;
|
||||||
|
|
|
@ -45,6 +45,7 @@ inline static void early_init() {}
|
||||||
|
|
||||||
u64 system_micros();
|
u64 system_micros();
|
||||||
u64 nano_count();
|
u64 nano_count();
|
||||||
|
void sleep_nanos(u64 nsec);
|
||||||
long getpagesize();
|
long getpagesize();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -20,7 +20,7 @@ void factor_vm::primitive_nano_count()
|
||||||
|
|
||||||
void factor_vm::primitive_sleep()
|
void factor_vm::primitive_sleep()
|
||||||
{
|
{
|
||||||
sleep_nanos(factor_vm::to_unsigned_8(dpop()));
|
sleep_nanos(to_unsigned_8(dpop()));
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -674,7 +674,6 @@ struct factor_vm
|
||||||
|
|
||||||
// os-windows
|
// os-windows
|
||||||
#if defined(WINDOWS)
|
#if defined(WINDOWS)
|
||||||
void sleep_nanos(u64 nsec);
|
|
||||||
const vm_char *vm_executable_path();
|
const vm_char *vm_executable_path();
|
||||||
const vm_char *default_image_path();
|
const vm_char *default_image_path();
|
||||||
void windows_image_path(vm_char *full_path, vm_char *temp_path, unsigned int length);
|
void windows_image_path(vm_char *full_path, vm_char *temp_path, unsigned int length);
|
||||||
|
|
Loading…
Reference in New Issue