Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
google
GitHub Repository: google/crosvm
Path: blob/main/base/src/sys/windows/mod.rs
5394 views
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::is_cpu_online;
64
pub use system_info::number_of_logical_cores;
65
pub use system_info::number_of_online_cores;
66
pub use system_info::pagesize;
67
pub use system_info::set_thread_name;
68
pub use terminal::*;
69
use winapi::shared::minwindef::DWORD;
70
pub(crate) use write_zeroes::file_write_zeroes_at;
71
72
pub use crate::errno::Error;
73
pub use crate::errno::Result;
74
pub use crate::errno::*;
75
76
/// Process identifier.
77
pub type Pid = DWORD;
78
79