8#ifndef LLVM_SUPPORT_LOCKFILEMANAGER_H
9#define LLVM_SUPPORT_LOCKFILEMANAGER_H
32 struct OwnerUnknown {};
34 struct OwnedByAnother {
35 std::string OwnerHostName;
38 std::variant<OwnerUnknown, OwnedByUs, OwnedByAnother> Owner;
40 LockFileManager(
const LockFileManager &) =
delete;
41 LockFileManager &operator=(
const LockFileManager &) =
delete;
43 static std::optional<OwnedByAnother> readLockFile(
StringRef LockFileName);
45 static bool processStillExecuting(
StringRef Hostname,
int PID);
67 ~LockFileManager()
override;
This file defines the SmallString class.
A synchronization primitive with weak mutual exclusion guarantees.
Tagged union holding either a T or a Error.
std::error_code unsafeMaybeUnlock() override
Remove the lock file.
WaitForUnlockResult waitForUnlockFor(std::chrono::seconds MaxSeconds) override
For a shared lock, wait until the owner releases the lock.
Expected< bool > tryLock() override
Tries to acquire the lock without blocking.
SmallString - A SmallString is just a SmallVector with methods and accessors that make it work better...
StringRef - Represent a constant reference to a string, i.e.
This is an optimization pass for GlobalISel generic memory operations.
WaitForUnlockResult
Describes the result of waiting for the owner to release the lock.