11#include "llvm/Support/Errno.h"
23 fl.l_type = lock_type;
24 fl.l_whence = SEEK_SET;
27 fl.l_pid = ::getpid();
29 if (llvm::sys::RetryAfterSignal(-1, ::fcntl, fd, cmd, &fl) == -1)
static Status fileLock(int fd, int cmd, int lock_type, const uint64_t start, const uint64_t len)
Status DoTryReadLock(const uint64_t start, const uint64_t len) override
Status DoUnlock() override
~LockFilePosix() override
Status DoReadLock(const uint64_t start, const uint64_t len) override
Status DoTryWriteLock(const uint64_t start, const uint64_t len) override
Status DoWriteLock(const uint64_t start, const uint64_t len) override
static Status FromErrno()
Set the current error to errno.
A class that represents a running process on the host machine.