use locking on Windows
This is all the easy cases, where there was already a separate lock file.
This commit is contained in:
parent
8de4db664d
commit
891c85cd88
8 changed files with 95 additions and 40 deletions
24
Types/LockPool.hs
Normal file
24
Types/LockPool.hs
Normal file
|
@ -0,0 +1,24 @@
|
|||
{- git-annex lock pool data types
|
||||
-
|
||||
- Copyright 2014 Joey Hess <joey@kitenet.net>
|
||||
-
|
||||
- Licensed under the GNU GPL version 3 or higher.
|
||||
-}
|
||||
|
||||
{-# LANGUAGE CPP #-}
|
||||
|
||||
module Types.LockPool (
|
||||
LockPool,
|
||||
LockHandle
|
||||
) where
|
||||
|
||||
import qualified Data.Map as M
|
||||
|
||||
#ifndef mingw32_HOST_OS
|
||||
import System.Posix.Types (Fd)
|
||||
type LockHandle = Fd
|
||||
#else
|
||||
import Utility.WinLock -- defines LockHandle
|
||||
#endif
|
||||
|
||||
type LockPool = M.Map FilePath LockHandle
|
Loading…
Add table
Add a link
Reference in a new issue