diff --git a/vlib/builtin/cfns.c.v b/vlib/builtin/cfns.c.v index ed66576e0e..d60fd55848 100644 --- a/vlib/builtin/cfns.c.v +++ b/vlib/builtin/cfns.c.v @@ -528,3 +528,15 @@ fn C.WrappedNSLog(str &u8) fn C.abs(number int) int fn C.GetDiskFreeSpaceExA(const_path &char, free_bytes_available_to_caller &u64, total_number_of_bytes &u64, total_number_of_free_bytes &u64) bool + +// C.SYSTEM_INFO contains information about the current computer system. This includes the architecture and type of the processor, the number of processors in the system, the page size, and other such information. +@[typedef] +pub struct C.SYSTEM_INFO { + dwNumberOfProcessors u32 + dwPageSize u32 +} + +fn C.GetSystemInfo(&C.SYSTEM_INFO) + +@[typedef] +pub struct C.SRWLOCK {} diff --git a/vlib/os/os_windows.c.v b/vlib/os/os_windows.c.v index 7b0b226835..7c9e1137ad 100644 --- a/vlib/os/os_windows.c.v +++ b/vlib/os/os_windows.c.v @@ -585,15 +585,6 @@ fn get_long_path(path string) !string { return long_path } -// C.SYSTEM_INFO contains information about the current computer system. This includes the architecture and type of the processor, the number of processors in the system, the page size, and other such information. -@[typedef] -pub struct C.SYSTEM_INFO { - dwNumberOfProcessors u32 - dwPageSize u32 -} - -fn C.GetSystemInfo(&C.SYSTEM_INFO) - // page_size returns the page size in bytes. pub fn page_size() int { sinfo := C.SYSTEM_INFO{} diff --git a/vlib/runtime/runtime_windows.c.v b/vlib/runtime/runtime_windows.c.v index 37a7a400cc..5ef5f55a34 100644 --- a/vlib/runtime/runtime_windows.c.v +++ b/vlib/runtime/runtime_windows.c.v @@ -8,7 +8,6 @@ pub struct C.MEMORYSTATUS { dwAvailPhys usize } -fn C.GetSystemInfo(&C.SYSTEM_INFO) fn C.GlobalMemoryStatus(&C.MEMORYSTATUS) // nr_cpus returns the number of virtual CPU cores found on the system. diff --git a/vlib/sync/sync_windows.c.v b/vlib/sync/sync_windows.c.v index 4b91a17462..56207c94ae 100644 --- a/vlib/sync/sync_windows.c.v +++ b/vlib/sync/sync_windows.c.v @@ -22,9 +22,6 @@ type MHANDLE = voidptr // Semaphore HANDLE type SHANDLE = voidptr -@[typedef] -pub struct C.SRWLOCK {} - @[typedef] pub struct C.CONDITION_VARIABLE {}