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