Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(237)

Side by Side Diff: source/common/umutex.cpp

Issue 1225213014: go back to ps #4 Base URL: https://chromium.googlesource.com/chromium/deps/icu.git@master
Patch Set: Created 5 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « source/common/umutex.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 ****************************************************************************** 2 ******************************************************************************
3 * 3 *
4 * Copyright (C) 1997-2014, International Business Machines 4 * Copyright (C) 1997-2014, International Business Machines
5 * Corporation and others. All Rights Reserved. 5 * Corporation and others. All Rights Reserved.
6 * 6 *
7 ****************************************************************************** 7 ******************************************************************************
8 * 8 *
9 * File umutex.cpp 9 * File umutex.cpp
10 * 10 *
(...skipping 331 matching lines...) Expand 10 before | Expand all | Expand 10 after
342 umtx_atomic_dec(u_atomic_int32_t *p) { 342 umtx_atomic_dec(u_atomic_int32_t *p) {
343 int32_t retVal; 343 int32_t retVal;
344 umtx_lock(&gIncDecMutex); 344 umtx_lock(&gIncDecMutex);
345 retVal = --(*p); 345 retVal = --(*p);
346 umtx_unlock(&gIncDecMutex); 346 umtx_unlock(&gIncDecMutex);
347 return retVal; 347 return retVal;
348 } 348 }
349 349
350 U_COMMON_API int32_t U_EXPORT2 350 U_COMMON_API int32_t U_EXPORT2
351 umtx_loadAcquire(u_atomic_int32_t &var) { 351 umtx_loadAcquire(u_atomic_int32_t &var) {
352 umtx_lock(&gIncDecMutex);
352 int32_t val = var; 353 int32_t val = var;
353 umtx_lock(&gIncDecMutex);
354 umtx_unlock(&gIncDecMutex); 354 umtx_unlock(&gIncDecMutex);
355 return val; 355 return val;
356 } 356 }
357 357
358 U_COMMON_API void U_EXPORT2 358 U_COMMON_API void U_EXPORT2
359 umtx_storeRelease(u_atomic_int32_t &var, int32_t val) { 359 umtx_storeRelease(u_atomic_int32_t &var, int32_t val) {
360 umtx_lock(&gIncDecMutex); 360 umtx_lock(&gIncDecMutex);
361 var = val;
361 umtx_unlock(&gIncDecMutex); 362 umtx_unlock(&gIncDecMutex);
362 var = val;
363 } 363 }
364 364
365 U_NAMESPACE_END 365 U_NAMESPACE_END
366 #endif 366 #endif
367 367
368 //-------------------------------------------------------------------------- 368 //--------------------------------------------------------------------------
369 // 369 //
370 // Deprecated functions for setting user mutexes. 370 // Deprecated functions for setting user mutexes.
371 // 371 //
372 //-------------------------------------------------------------------------- 372 //--------------------------------------------------------------------------
(...skipping 10 matching lines...) Expand all
383 383
384 384
385 U_DEPRECATED void U_EXPORT2 385 U_DEPRECATED void U_EXPORT2
386 u_setAtomicIncDecFunctions(const void * /*context */, UMtxAtomicFn *, UMtxAtomic Fn *, 386 u_setAtomicIncDecFunctions(const void * /*context */, UMtxAtomicFn *, UMtxAtomic Fn *,
387 UErrorCode *status) { 387 UErrorCode *status) {
388 if (U_SUCCESS(*status)) { 388 if (U_SUCCESS(*status)) {
389 *status = U_UNSUPPORTED_ERROR; 389 *status = U_UNSUPPORTED_ERROR;
390 } 390 }
391 return; 391 return;
392 } 392 }
OLDNEW
« no previous file with comments | « source/common/umutex.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698