From e48f551505b3923d7c17e3b42330060e84129673 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Tue, 28 Jan 2014 14:17:14 -0400 Subject: use locking on Windows This is all the easy cases, where there was already a separate lock file. --- Types/LockPool.hs | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 Types/LockPool.hs (limited to 'Types/LockPool.hs') 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 + - + - 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 -- cgit v1.2.3