factor/vm/os-windows-ce.cpp

46 lines
693 B
C++
Raw Normal View History

2009-05-02 05:04:19 -04:00
#include "master.hpp"
2009-05-04 02:46:13 -04:00
namespace factor
{
2009-05-05 12:33:35 -04:00
s64 current_micros()
2009-05-02 05:04:19 -04:00
{
SYSTEMTIME st;
FILETIME ft;
GetSystemTime(&st);
SystemTimeToFileTime(&st, &ft);
return (((s64)ft.dwLowDateTime
| (s64)ft.dwHighDateTime<<32) - EPOCH_OFFSET) / 10;
}
char *strerror(int err)
{
/* strerror() is not defined on WinCE */
return "strerror() is not defined on WinCE. Use native I/O.";
}
2009-05-04 05:50:24 -04:00
void flush_icache(cell start, cell end)
2009-05-02 05:04:19 -04:00
{
FlushInstructionCache(GetCurrentProcess(), 0, 0);
}
char *getenv(char *name)
{
not_implemented_error();
return 0; /* unreachable */
}
PRIMITIVE(os_envs)
2009-05-02 05:04:19 -04:00
{
not_implemented_error();
}
2009-05-04 05:50:24 -04:00
void c_to_factor_toplevel(cell quot)
2009-05-02 05:04:19 -04:00
{
c_to_factor(quot);
}
2009-05-05 12:33:35 -04:00
void open_console() { }
2009-05-04 02:46:13 -04:00
}