rustc_data_structures/
flock.rs

1//! Simple file-locking apis for each OS.
2//!
3//! This is not meant to be in the standard library, it does nothing with
4//! green/native threading. This is just a bare-bones enough solution for
5//! librustdoc, it is not production quality at all.
6
7cfg_match! {
8    target_os = "linux" => {
9        mod linux;
10        use linux as imp;
11    }
12    target_os = "redox" => {
13        mod linux;
14        use linux as imp;
15    }
16    unix => {
17        mod unix;
18        use unix as imp;
19    }
20    windows => {
21        mod windows;
22        use self::windows as imp;
23    }
24    _ => {
25        mod unsupported;
26        use unsupported as imp;
27    }
28}
29
30pub use imp::Lock;