2014-03-16 01:08:56 -07: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.
|
|
|
|
|
2014-03-21 18:05:05 -07:00
|
|
|
#![allow(non_camel_case_types)]
|
2018-09-07 00:27:20 -07:00
|
|
|
#![allow(nonstandard_style)]
|
2014-03-16 01:08:56 -07:00
|
|
|
|
2018-09-07 00:27:20 -07:00
|
|
|
cfg_if! {
|
2020-05-20 02:27:03 +01:00
|
|
|
if #[cfg(target_os = "linux")] {
|
2022-04-14 18:29:21 -04:00
|
|
|
mod linux;
|
|
|
|
use linux as imp;
|
2020-05-20 02:27:03 +01:00
|
|
|
} else if #[cfg(unix)] {
|
2022-04-14 18:29:21 -04:00
|
|
|
mod unix;
|
|
|
|
use unix as imp;
|
2018-09-07 00:27:20 -07:00
|
|
|
} else if #[cfg(windows)] {
|
2022-04-14 18:29:21 -04:00
|
|
|
mod windows;
|
|
|
|
use windows as imp;
|
2018-09-07 00:27:20 -07:00
|
|
|
} else {
|
2022-04-14 18:29:21 -04:00
|
|
|
mod unsupported;
|
|
|
|
use unsupported as imp;
|
2014-03-16 01:08:56 -07:00
|
|
|
}
|
2016-08-15 13:52:38 -04:00
|
|
|
}
|
2022-04-14 18:29:21 -04:00
|
|
|
|
|
|
|
pub use imp::Lock;
|