summaryrefslogtreecommitdiffstats
path: root/contrib/libs/icu/common/mutex.h
diff options
context:
space:
mode:
authorneksard <[email protected]>2022-02-10 16:45:33 +0300
committerDaniil Cherednik <[email protected]>2022-02-10 16:45:33 +0300
commit1d9c550e7c38e051d7961f576013a482003a70d9 (patch)
treeb2cc84ee7850122e7ccf51d0ea21e4fa7e7a5685 /contrib/libs/icu/common/mutex.h
parent8f7cf138264e0caa318144bf8a2c950e0b0a8593 (diff)
Restoring authorship annotation for <[email protected]>. Commit 2 of 2.
Diffstat (limited to 'contrib/libs/icu/common/mutex.h')
-rw-r--r--contrib/libs/icu/common/mutex.h82
1 files changed, 41 insertions, 41 deletions
diff --git a/contrib/libs/icu/common/mutex.h b/contrib/libs/icu/common/mutex.h
index c956698ec08..44b1f90ba04 100644
--- a/contrib/libs/icu/common/mutex.h
+++ b/contrib/libs/icu/common/mutex.h
@@ -1,33 +1,33 @@
// © 2016 and later: Unicode, Inc. and others.
-// License & terms of use: http://www.unicode.org/copyright.html
-/*
-******************************************************************************
-*
-* Copyright (C) 1997-2013, International Business Machines
-* Corporation and others. All Rights Reserved.
-*
-******************************************************************************
-*/
-//----------------------------------------------------------------------------
-// File: mutex.h
-//
-// Lightweight C++ wrapper for umtx_ C mutex functions
-//
-// Author: Alan Liu 1/31/97
-// History:
-// 06/04/97 helena Updated setImplementation as per feedback from 5/21 drop.
-// 04/07/1999 srl refocused as a thin wrapper
-//
-//----------------------------------------------------------------------------
-#ifndef MUTEX_H
-#define MUTEX_H
-
-#include "unicode/utypes.h"
-#include "unicode/uobject.h"
-#include "umutex.h"
-
-U_NAMESPACE_BEGIN
-
+// License & terms of use: http://www.unicode.org/copyright.html
+/*
+******************************************************************************
+*
+* Copyright (C) 1997-2013, International Business Machines
+* Corporation and others. All Rights Reserved.
+*
+******************************************************************************
+*/
+//----------------------------------------------------------------------------
+// File: mutex.h
+//
+// Lightweight C++ wrapper for umtx_ C mutex functions
+//
+// Author: Alan Liu 1/31/97
+// History:
+// 06/04/97 helena Updated setImplementation as per feedback from 5/21 drop.
+// 04/07/1999 srl refocused as a thin wrapper
+//
+//----------------------------------------------------------------------------
+#ifndef MUTEX_H
+#define MUTEX_H
+
+#include "unicode/utypes.h"
+#include "unicode/uobject.h"
+#include "umutex.h"
+
+U_NAMESPACE_BEGIN
+
/**
* Mutex is a helper class for convenient locking and unlocking of a UMutex.
*
@@ -52,26 +52,26 @@ U_NAMESPACE_BEGIN
* returning a Mutex. This is a common mistake which silently slips through the
* compiler!!
*/
-
-class U_COMMON_API Mutex : public UMemory {
-public:
+
+class U_COMMON_API Mutex : public UMemory {
+public:
Mutex(UMutex *mutex = nullptr) : fMutex(mutex) {
umtx_lock(fMutex);
}
~Mutex() {
umtx_unlock(fMutex);
}
-
+
Mutex(const Mutex &other) = delete; // forbid assigning of this class
Mutex &operator=(const Mutex &other) = delete; // forbid copying of this class
void *operator new(size_t s) = delete; // forbid heap allocation. Locals only.
-private:
+private:
UMutex *fMutex;
-};
-
-
-U_NAMESPACE_END
-
-#endif //_MUTEX_
-//eof
+};
+
+
+U_NAMESPACE_END
+
+#endif //_MUTEX_
+//eof