Go to the documentation of this file.
8 #ifndef LLVM_SUPPORT_LOCKFILEMANAGER_H
9 #define LLVM_SUPPORT_LOCKFILEMANAGER_H
13 #include <system_error>
58 std::error_code ErrorCode;
59 std::string ErrorDiagMsg;
67 static bool processStillExecuting(
StringRef Hostname,
int PID);
94 ErrorDiagMsg = ErrorMsg.str();
100 #endif // LLVM_SUPPORT_LOCKFILEMANAGER_H
std::error_code unsafeRemoveLockFile()
Remove the lock file.
@ LFS_Owned
The lock file has been created and is owned by this instance of the object.
This is an optimization pass for GlobalISel generic memory operations.
WaitForUnlockResult
Describes the result of waiting for the owner to release the lock.
@ LFS_Shared
The lock file already exists and is owned by some other instance.
LockFileState getState() const
Determine the state of the lock file.
@ Res_Timeout
Reached timeout while waiting for the owner to release the lock.
void setError(const std::error_code &EC, StringRef ErrorMsg="")
Set error and error message.
LockFileState
Describes the state of a lock file.
@ Res_OwnerDied
Owner died while holding the lock.
@ LFS_Error
An error occurred while trying to create or find the lock file.
StringRef - Represent a constant reference to a string, i.e.
Class that manages the creation of a lock file to aid implicit coordination between different process...
WaitForUnlockResult waitForUnlock(const unsigned MaxSeconds=90)
For a shared lock, wait until the owner releases the lock.
@ Res_Success
The lock was released successfully.
std::string getErrorMessage() const
Get error message, or "" if there is no error.