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.
|
|
|
|
|
2023-10-19 20:18:51 -03:00
|
|
|
cfg_match! {
|
|
|
|
cfg(target_os = "linux") => {
|
2022-04-14 18:29:21 -04:00
|
|
|
mod linux;
|
|
|
|
use linux as imp;
|
2023-10-19 20:18:51 -03:00
|
|
|
}
|
|
|
|
cfg(unix) => {
|
2022-04-14 18:29:21 -04:00
|
|
|
mod unix;
|
|
|
|
use unix as imp;
|
2023-10-19 20:18:51 -03:00
|
|
|
}
|
|
|
|
cfg(windows) => {
|
2022-04-14 18:29:21 -04:00
|
|
|
mod windows;
|
2023-01-15 13:43:15 -05:00
|
|
|
use self::windows as imp;
|
2023-10-19 20:18:51 -03:00
|
|
|
}
|
|
|
|
_ => {
|
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;
|