diff options
author | Joey Hess <joey@kitenet.net> | 2014-01-28 14:17:14 -0400 |
---|---|---|
committer | Joey Hess <joey@kitenet.net> | 2014-01-28 14:42:03 -0400 |
commit | e48f551505b3923d7c17e3b42330060e84129673 (patch) | |
tree | 5de335f5cc25b39a5d4ca12fdb6a076e03cf34db /Types/LockPool.hs | |
parent | 4a923c3ee0e238ccc17881179bec77c6531e3ad4 (diff) |
use locking on Windows
This is all the easy cases, where there was already a separate lock file.
Diffstat (limited to 'Types/LockPool.hs')
-rw-r--r-- | Types/LockPool.hs | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/Types/LockPool.hs b/Types/LockPool.hs new file mode 100644 index 000000000..dd392f28b --- /dev/null +++ b/Types/LockPool.hs @@ -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 |