]> gitweb.factorcode.org Git - factor.git/commitdiff
fix windows compile error
authorDoug Coleman <doug.coleman@gmail.com>
Fri, 20 Nov 2009 10:21:21 +0000 (04:21 -0600)
committerDoug Coleman <doug.coleman@gmail.com>
Fri, 20 Nov 2009 10:21:21 +0000 (04:21 -0600)
vm/os-windows-nt.cpp
vm/os-windows.cpp
vm/os-windows.hpp
vm/run.cpp
vm/vm.hpp

index c46628d41e7f23d56ac42ebd7bda0cf65c5f536b..796834a9c4529582586199b4493f7d6b618cc8b3 100755 (executable)
@@ -51,6 +51,11 @@ u64 nano_count()
        return count.QuadPart*(1000000000/frequency.QuadPart);
 }
 
+void sleep_nanos(u64 nsec)
+{
+       Sleep((DWORD)(nsec/1000000));
+}
+
 LONG factor_vm::exception_handler(PEXCEPTION_POINTERS pe)
 {
        PEXCEPTION_RECORD e = (PEXCEPTION_RECORD)pe->ExceptionRecord;
index 8a7cf9024ba1a3d46f13704f7a0a5816f2326a7e..78426b19ca0e57c7b61be1ebb2e9315ea25bd975 100755 (executable)
@@ -126,11 +126,6 @@ segment::~segment()
                fatal_error("Segment deallocation failed",0);
 }
 
-void sleep_nanos(u64 nsec)
-{
-       Sleep((DWORD)(nsec/1000000));
-}
-
 long getpagesize()
 {
        static long g_pagesize = 0;
index 37591a529f15c019257635f660d2fffcede15b8f..eeac2a42ddff2f79348e7a17897cda15f47df062 100644 (file)
@@ -45,6 +45,7 @@ inline static void early_init() {}
 
 u64 system_micros();
 u64 nano_count();
+void sleep_nanos(u64 nsec);
 long getpagesize();
 
 }
index ebe3678439297f06c80279f5cda047d0d0d4bcf2..1bb2e0c44ebdc8e879810d45b7b66dd149b50ecb 100755 (executable)
@@ -20,7 +20,7 @@ void factor_vm::primitive_nano_count()
 
 void factor_vm::primitive_sleep()
 {
-       sleep_nanos(factor_vm::to_unsigned_8(dpop()));
+       sleep_nanos(to_unsigned_8(dpop()));
 }
 
 }
index 04eaf3d2ef6910a72814f3b11df6754ff9e56cff..4f82e595989096b757657c28349a013663ece088 100755 (executable)
--- a/vm/vm.hpp
+++ b/vm/vm.hpp
@@ -674,7 +674,6 @@ struct factor_vm
 
        // os-windows
   #if defined(WINDOWS)
-       void sleep_nanos(u64 nsec);
        const vm_char *vm_executable_path();
        const vm_char *default_image_path();
        void windows_image_path(vm_char *full_path, vm_char *temp_path, unsigned int length);