diff options
author | Argyrios Kyrtzidis <akyrtzi@gmail.com> | 2014-04-06 03:19:31 +0000 |
---|---|---|
committer | Argyrios Kyrtzidis <akyrtzi@gmail.com> | 2014-04-06 03:19:31 +0000 |
commit | 20384a5583ef97644120f819e3d403652d36825d (patch) | |
tree | 187f0afe2e953b27f65e1b1451410cb9d363448e /include/llvm/Support | |
parent | ec37734d3c914411f623fc04d037bb80ff95e220 (diff) | |
download | llvm-20384a5583ef97644120f819e3d403652d36825d.tar.gz llvm-20384a5583ef97644120f819e3d403652d36825d.tar.bz2 llvm-20384a5583ef97644120f819e3d403652d36825d.tar.xz |
[Support] Modify LockFileManager::waitForUnlock() to return info about how the lock was released.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@205683 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/Support')
-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 9df8675ef0..523a781b87 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 |