mirror of
https://github.com/Kitware/CMake.git
synced 2026-02-19 13:40:42 -06:00
Revise C++ coding style using clang-format-6.0
Run the `clang-format.bash` script to update all our C and C++ code to a new style defined by `.clang-format`. Use `clang-format` version 6.0. * If you reached this commit for a line in `git blame`, re-run the blame operation starting at the parent of this commit to see older history for the content. * See the parent commit for instructions to rebase a change across this style transition commit.
This commit is contained in:
@@ -8,17 +8,17 @@
|
||||
#include <string>
|
||||
|
||||
#if defined(_WIN32)
|
||||
#include <windows.h> // HANDLE
|
||||
# include <windows.h> // HANDLE
|
||||
#endif
|
||||
|
||||
class cmFileLockResult;
|
||||
|
||||
/**
|
||||
* @brief Cross-platform file locking.
|
||||
* @details Under the hood this class use 'fcntl' for Unix-like platforms and
|
||||
* 'LockFileEx'/'UnlockFileEx' for Win32 platform. Locks are exclusive and
|
||||
* advisory.
|
||||
*/
|
||||
* @brief Cross-platform file locking.
|
||||
* @details Under the hood this class use 'fcntl' for Unix-like platforms and
|
||||
* 'LockFileEx'/'UnlockFileEx' for Win32 platform. Locks are exclusive and
|
||||
* advisory.
|
||||
*/
|
||||
class cmFileLock
|
||||
{
|
||||
CM_DISABLE_COPY(cmFileLock)
|
||||
@@ -28,21 +28,21 @@ public:
|
||||
~cmFileLock();
|
||||
|
||||
/**
|
||||
* @brief Lock the file.
|
||||
* @param timeoutSec Lock timeout. If -1 try until success or fatal error.
|
||||
*/
|
||||
* @brief Lock the file.
|
||||
* @param timeoutSec Lock timeout. If -1 try until success or fatal error.
|
||||
*/
|
||||
cmFileLockResult Lock(const std::string& filename, unsigned long timeoutSec);
|
||||
|
||||
/**
|
||||
* @brief Unlock the file.
|
||||
*/
|
||||
* @brief Unlock the file.
|
||||
*/
|
||||
cmFileLockResult Release();
|
||||
|
||||
/**
|
||||
* @brief Check file is locked by this class.
|
||||
* @details This function helps to find double locks (deadlocks) and to do
|
||||
* explicit unlocks.
|
||||
*/
|
||||
* @brief Check file is locked by this class.
|
||||
* @details This function helps to find double locks (deadlocks) and to do
|
||||
* explicit unlocks.
|
||||
*/
|
||||
bool IsLocked(const std::string& filename) const;
|
||||
|
||||
private:
|
||||
|
||||
Reference in New Issue
Block a user