11#include "llvm/Support/Errno.h"
23 fl.l_type = lock_type;
24 fl.l_whence = SEEK_SET;
27 fl.l_pid = ::getpid();
30 if (llvm::sys::RetryAfterSignal(-1, ::fcntl, fd, cmd, &fl) == -1)
31 error.SetErrorToErrno();
static llvm::raw_ostream & error(Stream &strm)
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
A class that represents a running process on the host machine.