mirror of
				https://github.com/rust-lang/rust.git
				synced 2025-10-30 20:44:34 +00:00 
			
		
		
		
	
		
			
				
	
	
		
			27 lines
		
	
	
		
			593 B
		
	
	
	
		
			Rust
		
	
	
	
	
	
			
		
		
	
	
			27 lines
		
	
	
		
			593 B
		
	
	
	
		
			Rust
		
	
	
	
	
	
| //! 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.
 | |
| 
 | |
| cfg_match! {
 | |
|     cfg(target_os = "linux") => {
 | |
|         mod linux;
 | |
|         use linux as imp;
 | |
|     }
 | |
|     cfg(unix) => {
 | |
|         mod unix;
 | |
|         use unix as imp;
 | |
|     }
 | |
|     cfg(windows) => {
 | |
|         mod windows;
 | |
|         use self::windows as imp;
 | |
|     }
 | |
|     _ => {
 | |
|         mod unsupported;
 | |
|         use unsupported as imp;
 | |
|     }
 | |
| }
 | |
| 
 | |
| pub use imp::Lock;
 | 
