about summary refs log tree commit diff
path: root/src/libstore/pathlocks.hh
diff options
context:
space:
mode:
authorEelco Dolstra <e.dolstra@tudelft.nl>2006-06-20T17·48+0000
committerEelco Dolstra <e.dolstra@tudelft.nl>2006-06-20T17·48+0000
commitdbf6d7e783ff86c60d39f5000e341082d2604e85 (patch)
tree34522d5619d43bfdc7ef1a87639a17ae2b1093de /src/libstore/pathlocks.hh
parentcc51f9c539a3822c84a2285efcec11b577727234 (diff)
* Concurrent GC on Cygwin.
Diffstat (limited to 'src/libstore/pathlocks.hh')
-rw-r--r--src/libstore/pathlocks.hh10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/libstore/pathlocks.hh b/src/libstore/pathlocks.hh
index 2fd0e0d1ed..911fe4579f 100644
--- a/src/libstore/pathlocks.hh
+++ b/src/libstore/pathlocks.hh
@@ -4,6 +4,16 @@
 #include "util.hh"
 
 
+/* Open (possibly create) a lock file and return the file descriptor.
+   -1 is returned if create is false and the lock could not be opened
+   because it doesn't exist.  Any other error throws an exception. */
+int openLockFile(const Path & path, bool create);
+
+/* Delete an open lock file.  Both must be called to be fully portable
+   between Unix and Windows. */
+void deleteLockFilePreClose(const Path & path, int fd);
+void deleteLockFilePostClose(const Path & path);
+
 typedef enum LockType { ltRead, ltWrite, ltNone };
 
 bool lockFile(int fd, LockType lockType, bool wait);