2014-03-16 08:08:56 +00:00
|
|
|
//! Simple file-locking apis for each OS.
|
|
|
|
//!
|
|
|
|
//! This is not meant to be in the standard library, it does nothing with
|
|
|
|
//! green/native threading. This is just a bare-bones enough solution for
|
|
|
|
//! librustdoc, it is not production quality at all.
|
|
|
|
|
2023-10-19 23:18:51 +00:00
|
|
|
cfg_match! {
|
|
|
|
cfg(target_os = "linux") => {
|
2022-04-14 22:29:21 +00:00
|
|
|
mod linux;
|
|
|
|
use linux as imp;
|
2023-10-19 23:18:51 +00:00
|
|
|
}
|
2023-02-12 01:34:41 +00:00
|
|
|
cfg(target_os = "redox") => {
|
|
|
|
mod linux;
|
|
|
|
use linux as imp;
|
|
|
|
}
|
2023-10-19 23:18:51 +00:00
|
|
|
cfg(unix) => {
|
2022-04-14 22:29:21 +00:00
|
|
|
mod unix;
|
|
|
|
use unix as imp;
|
2023-10-19 23:18:51 +00:00
|
|
|
}
|
|
|
|
cfg(windows) => {
|
2022-04-14 22:29:21 +00:00
|
|
|
mod windows;
|
2023-01-15 18:43:15 +00:00
|
|
|
use self::windows as imp;
|
2023-10-19 23:18:51 +00:00
|
|
|
}
|
|
|
|
_ => {
|
2022-04-14 22:29:21 +00:00
|
|
|
mod unsupported;
|
|
|
|
use unsupported as imp;
|
2014-03-16 08:08:56 +00:00
|
|
|
}
|
2016-08-15 17:52:38 +00:00
|
|
|
}
|
2022-04-14 22:29:21 +00:00
|
|
|
|
|
|
|
pub use imp::Lock;
|