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.
|
|
|
|
|
2024-12-22 20:12:42 +00:00
|
|
|
cfg_match! {
|
|
|
|
target_os = "linux" => {
|
|
|
|
mod linux;
|
|
|
|
use linux as imp;
|
|
|
|
}
|
|
|
|
target_os = "redox" => {
|
|
|
|
mod linux;
|
|
|
|
use linux as imp;
|
|
|
|
}
|
|
|
|
unix => {
|
|
|
|
mod unix;
|
|
|
|
use unix as imp;
|
|
|
|
}
|
|
|
|
windows => {
|
|
|
|
mod windows;
|
|
|
|
use self::windows as imp;
|
|
|
|
}
|
|
|
|
_ => {
|
|
|
|
mod unsupported;
|
|
|
|
use unsupported as imp;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2022-04-14 22:29:21 +00:00
|
|
|
pub use imp::Lock;
|