diff options
Diffstat (limited to 'include/llvm/Support/LockFileManager.h')
-rw-r--r-- | include/llvm/Support/LockFileManager.h | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/include/llvm/Support/LockFileManager.h b/include/llvm/Support/LockFileManager.h index 9df8675..523a781 100644 --- a/include/llvm/Support/LockFileManager.h +++ b/include/llvm/Support/LockFileManager.h @@ -40,6 +40,16 @@ public: LFS_Error }; + /// \brief Describes the result of waiting for the owner to release the lock. + enum WaitForUnlockResult { + /// \brief The lock was released successfully. + Res_Success, + /// \brief Owner died while holding the lock. + Res_OwnerDied, + /// \brief Reached timeout while waiting for the owner to release the lock. + Res_Timeout + }; + private: SmallString<128> FileName; SmallString<128> LockFileName; @@ -67,7 +77,7 @@ public: operator LockFileState() const { return getState(); } /// \brief For a shared lock, wait until the owner releases the lock. - void waitForUnlock(); + WaitForUnlockResult waitForUnlock(); }; } // end namespace llvm |