úÎ!4å1é0      !"#$%&'()*+,-./ Trustworthy Þ0 Trustworthy=1 Trustworthy ¼lukkoOpaque file descriptorThis is a wrapper over 2lukko!Open file to be used for locking. open(path, O_RDWR | O_CREAT); lukkoClose lock file.  close(fd); 3lukko Convert GHC 4 to lukko .53Safe2 Œlukko"Potentially availble lock methods.lukkoopen file descriptor lockinglukkoBSD flocklukkoWindows lockinglukkoNo-Op (throws  )lukko2Indicates a mode in which a file should be locked. lukkoException thrown by hLock. on non-Windows platforms that don't support flock.   Trustworthy ¯ lukko9A constants specifying whether file locking is supported.lukko!A constant specifying this methodlukkoLock using OFD locks.lukkoTry to lock using OFD locks.lukkoUnlock using OFD locks.lukkoLock using OFD locks.lukkoTry to lock using OFD locks.lukkoUnlock using OFD locks.   Safe.Ýlukko9A constants specifying whether file locking is supported.lukko!A constant specifying this methodlukkoNo-op implementation.lukkoNo-op implementationlukkoNo-op implementation.lukkoNo-op implementation.lukkoNo-op implementationlukkoNo-op implementation.    Trustworthy lukko9A constants specifying whether file locking is supported.lukko!A constant specifying this methodlukkoLock using OFD locks. lukkoTry to lock using OFD locks.!lukkoUnlock using OFD locks."lukkoLock using OFD locks.#lukkoTry to lock using OFD locks.$lukkoUnlock using OFD locks.  !"#$   !"#$ Trustworthy15 &lukkoOpaque file descriptorAn int / CInt on unix systems, and HANDLE on windows.'lukkoIf a 4ÿ references a file descriptor, attempt to lock contents of the underlying file in appropriate mode. If the file is already locked in incompatible mode, this function blocks until the lock is established. The lock is automatically released upon closing a 4.Things to be aware of:Ý1) This function may block inside a C call. If it does, in order to be able to interrupt it with asynchronous exceptions and/or for other threads to continue working, you MUST use threaded version of the runtime system.2) The implementation uses  LockFileEx on Windows, open file descriptor locks on Linux, and flock8 otherwise, hence all of their caveats also apply here./3) On non-Windows plaftorms that don't support flock& (e.g. Solaris) this function throws FileLockingNotImplemented). We deliberately choose to not provide fcntl7 based locking instead because of its broken semantics.(lukkoNon-blocking version of '.)lukkoRelease a lock taken with ' or (.*lukko!Open file to be used for locking.+lukkoClose lock file.,lukko Convert GHC 4 to lukko &.-lukkoLike '4, but work on "raw" file descriptor, as handled by * and +..lukkoNon-blocking version of -./lukkoRelease a lock taken with - or .. &'()*+,-./  &*+-./,'()6         !"#$%& ' lukko-0.1-FtIoKaT2ri6LCF9v0G0wJi Lukko.FLock Lukko.NoOp Lukko.OFDLukkoLukko.Internal.FillBytesLukko.Internal.HandleToFDLukko.Internal.FDLukko.Internal.TypesFDfdOpenfdCloseFileLockingMethod MethodOFD MethodFLock MethodWindows MethodNoOpLockMode SharedLock ExclusiveLockFileLockingNotSupportedfileLockingSupportedfileLockingMethodfdLock fdTryLockfdUnlockhLockhTryLockhUnlock$fStorableFLock handleToFdbaseForeign.Marshal.Utils fillBytes ghcHandleToFdForeign.C.TypesCIntGHC.IO.Handle.TypesHandle