summaryrefslogtreecommitdiff
path: root/Types/LockPool.hs
diff options
context:
space:
mode:
Diffstat (limited to 'Types/LockPool.hs')
-rw-r--r--Types/LockPool.hs24
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