diff options
author | Rémi Verschelde <rverschelde@gmail.com> | 2022-10-31 14:25:37 +0100 |
---|---|---|
committer | Rémi Verschelde <rverschelde@gmail.com> | 2022-10-31 14:25:37 +0100 |
commit | d43364e3cc3903385750241278caf312869b7cab (patch) | |
tree | e0d17f8d7a25552c7752ad1e0fc1c526f1c4c747 /thirdparty/icu4c/common/umutex.h | |
parent | a7f67d4a79106f9a72d5f266e05d7f0c6c71f276 (diff) | |
parent | 4e44a271f0cfd00f5d278fd3001f1750cf934e42 (diff) |
Merge pull request #67968 from bruvzg/icu72.1
ICU: Update to version 72.1
Diffstat (limited to 'thirdparty/icu4c/common/umutex.h')
-rw-r--r-- | thirdparty/icu4c/common/umutex.h | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/thirdparty/icu4c/common/umutex.h b/thirdparty/icu4c/common/umutex.h index 8d76b3f3e6..1b8332409c 100644 --- a/thirdparty/icu4c/common/umutex.h +++ b/thirdparty/icu4c/common/umutex.h @@ -71,7 +71,6 @@ U_NAMESPACE_BEGIN ****************************************************************************/ typedef std::atomic<int32_t> u_atomic_int32_t; -#define ATOMIC_INT32_T_INITIALIZER(val) ATOMIC_VAR_INIT(val) inline int32_t umtx_loadAcquire(u_atomic_int32_t &var) { return var.load(std::memory_order_acquire); @@ -96,18 +95,15 @@ inline int32_t umtx_atomic_dec(u_atomic_int32_t *var) { * *************************************************************************************************/ -struct UInitOnce { - u_atomic_int32_t fState; - UErrorCode fErrCode; +struct U_COMMON_API UInitOnce { + u_atomic_int32_t fState {0}; + UErrorCode fErrCode {U_ZERO_ERROR}; void reset() {fState = 0;} UBool isReset() {return umtx_loadAcquire(fState) == 0;} // Note: isReset() is used by service registration code. // Thread safety of this usage needs review. }; -#define U_INITONCE_INITIALIZER {ATOMIC_INT32_T_INITIALIZER(0), U_ZERO_ERROR} - - U_COMMON_API UBool U_EXPORT2 umtx_initImplPreInit(UInitOnce &); U_COMMON_API void U_EXPORT2 umtx_initImplPostInit(UInitOnce &); |