Cthulhu  0.2.10
Cthulhu compiler collection
win32.h
Go to the documentation of this file.
1 // SPDX-License-Identifier: LGPL-3.0-only
2 
3 #pragma once
4 
5 #include "core/win32.h" // IWYU pragma: export
6 
7 typedef HMODULE os_library_impl_t;
8 typedef HANDLE os_file_impl_t;
9 typedef WIN32_FIND_DATA os_inode_impl_t;
10 typedef HANDLE os_iter_impl_t;
11 typedef HANDLE os_thread_impl_t;
12 typedef CRITICAL_SECTION os_mutex_impl_t;
13 
14 typedef struct os_mapping_t
15 {
16  HANDLE handle;
17  LPVOID view;
18  size_t size;
19 } os_mapping_t;
20 
21 enum {
22  eOsSuccess = ERROR_SUCCESS,
23  eOsNotFound = ERROR_FILE_NOT_FOUND,
24  eOsExists = ERROR_ALREADY_EXISTS,
25  eOsTooSmall = ERROR_DISK_FULL,
26 };
27 
28 #define CT_OS_INVALID_FILE INVALID_HANDLE_VALUE
29 #define CT_OS_INVALID_LIBRARY NULL
30 #define CT_OS_INVALID_MAPPING NULL
31 #define CT_OS_INVALID_ITER INVALID_HANDLE_VALUE
32 #define CT_OS_THREAD_INVALID NULL
33 
34 #define CT_OS_NAME_MAX MAX_PATH
@ eOsNotFound
Definition: win32.h:23
@ eOsTooSmall
Definition: win32.h:25
@ eOsExists
Definition: win32.h:24
@ eOsSuccess
Definition: win32.h:22
HANDLE os_iter_impl_t
Definition: win32.h:10
WIN32_FIND_DATA os_inode_impl_t
Definition: win32.h:9
HMODULE os_library_impl_t
Definition: win32.h:7
CRITICAL_SECTION os_mutex_impl_t
Definition: win32.h:12
HANDLE os_file_impl_t
Definition: win32.h:8
HANDLE os_thread_impl_t
Definition: win32.h:11
memory mapping handle
Definition: posix.h:18
HANDLE handle
Definition: win32.h:16
size_t size
Definition: posix.h:20
LPVOID view
Definition: win32.h:17