• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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 #![cfg(windows)]
8 
9 #[macro_use]
10 pub mod ioctl;
11 #[macro_use]
12 pub mod syslog;
13 mod console;
14 mod descriptor;
15 mod event;
16 mod events;
17 pub mod file_traits;
18 mod file_util;
19 mod foreground_window;
20 mod get_filesystem_type;
21 mod iobuf;
22 mod mmap;
23 mod mmap_platform;
24 mod multi_process_mutex;
25 pub mod named_pipes;
26 pub mod platform_timer_resolution;
27 mod platform_timer_utils;
28 mod priority;
29 // Add conditional compile?
30 mod punch_hole;
31 mod read_write_wrappers;
32 mod sched;
33 mod shm;
34 mod stream_channel;
35 mod system_info;
36 mod terminal;
37 mod timer;
38 pub mod tube;
39 mod wait;
40 
41 pub mod thread;
42 
43 mod write_zeroes;
44 
45 pub use console::*;
46 pub use descriptor::*;
47 pub use event::*;
48 pub use events::*;
49 pub use file_util::get_allocated_ranges;
50 pub use file_util::open_file_or_duplicate;
51 pub use file_util::set_sparse_file;
52 pub use foreground_window::give_foregrounding_permission;
53 pub use get_filesystem_type::*;
54 pub use iobuf::IoBuf;
55 pub use ioctl::*;
56 pub use mmap::*;
57 pub(crate) use multi_process_mutex::MultiProcessMutex;
58 pub use priority::*;
59 pub(crate) use punch_hole::file_punch_hole;
60 pub use read_write_wrappers::*;
61 pub use sched::*;
62 pub use stream_channel::*;
63 pub use system_info::allocation_granularity;
64 pub use system_info::getpid;
65 pub use system_info::number_of_logical_cores;
66 pub use system_info::pagesize;
67 pub use terminal::*;
68 pub use timer::*;
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