xref: /aosp_15_r20/external/crosvm/base/src/sys/windows/mod.rs (revision bb4ee6a4ae7042d18b07a98463b9c8b875e44b39)
1 // Copyright 2022 The ChromiumOS Authors
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4 
5 //! Small system utility modules for usage by other modules.
6 
7 #[macro_use]
8 pub mod ioctl;
9 #[macro_use]
10 pub mod syslog;
11 mod async_wait_for_single_object;
12 mod console;
13 mod descriptor;
14 mod event;
15 mod events;
16 pub mod file_traits;
17 mod file_util;
18 mod foreground_window;
19 mod iobuf;
20 mod mmap;
21 mod mmap_platform;
22 mod multi_process_mutex;
23 pub mod named_pipes;
24 pub mod platform_timer_resolution;
25 mod platform_timer_utils;
26 mod priority;
27 // Add conditional compile?
28 mod punch_hole;
29 mod read_write_wrappers;
30 mod sched;
31 mod shm;
32 mod stream_channel;
33 mod system_info;
34 mod terminal;
35 mod timer;
36 pub mod tube;
37 mod wait;
38 
39 pub mod thread;
40 
41 mod write_zeroes;
42 
43 pub use async_wait_for_single_object::async_wait_for_single_object;
44 pub use console::*;
45 pub use descriptor::*;
46 pub use event::*;
47 pub use events::*;
48 pub use file_util::get_allocated_ranges;
49 pub use file_util::open_file_or_duplicate;
50 pub use file_util::set_sparse_file;
51 pub use foreground_window::give_foregrounding_permission;
52 pub use iobuf::IoBuf;
53 pub use ioctl::*;
54 pub use mmap::*;
55 pub(crate) use multi_process_mutex::MultiProcessMutex;
56 pub use priority::*;
57 pub(crate) use punch_hole::file_punch_hole;
58 pub use read_write_wrappers::*;
59 pub use sched::*;
60 pub use stream_channel::*;
61 pub use system_info::allocation_granularity;
62 pub use system_info::getpid;
63 pub use system_info::number_of_logical_cores;
64 pub use system_info::pagesize;
65 pub use system_info::set_thread_name;
66 pub use terminal::*;
67 use winapi::shared::minwindef::DWORD;
68 pub(crate) use write_zeroes::file_write_zeroes_at;
69 
70 pub use crate::errno::Error;
71 pub use crate::errno::Result;
72 pub use crate::errno::*;
73 
74 /// Process identifier.
75 pub type Pid = DWORD;
76