mirror of
https://github.com/unicode-org/icu.git
synced 2025-04-08 06:53:45 +00:00
ICU-2707 Change the #warning into a #error, and allow CMA threads to build umutex.c
X-SVN-Rev: 12239
This commit is contained in:
parent
15fa2080f7
commit
89aff51cad
1 changed files with 6 additions and 13 deletions
|
@ -301,9 +301,9 @@ umtx_atomic_inc(int32_t *p)
|
|||
pthread_mutex_init((pthread_mutex_t*)&gIncDecMutex, pthread_mutexattr_default);
|
||||
# else
|
||||
pthread_mutex_init((pthread_mutex_t*)&gIncDecMutex, NULL);
|
||||
# endif
|
||||
gIncDecMutexInitialized = TRUE;
|
||||
}
|
||||
# endif
|
||||
umtx_unlock(NULL);
|
||||
}
|
||||
|
||||
|
@ -331,22 +331,15 @@ umtx_atomic_dec(int32_t *p)
|
|||
#else
|
||||
|
||||
/* No recognized platform. */
|
||||
#warning No atomic increment and decrement defined for this platform.
|
||||
|
||||
U_CAPI int32_t U_EXPORT2
|
||||
umtx_atomic_inc(int32_t *p) {
|
||||
return ++(*p);
|
||||
}
|
||||
|
||||
U_CAPI int32_t U_EXPORT2
|
||||
umtx_atomic_dec(int32_t *p) {
|
||||
return --(*p);
|
||||
}
|
||||
#error No atomic increment and decrement defined for this platform. \
|
||||
Either use the --disable-threads configure option, or define those functions in this file.
|
||||
|
||||
#endif /* Platform selection for atomic_inc and dec. */
|
||||
|
||||
|
||||
#else /* (ICU_USE_THREADS == 1) */
|
||||
#else /* (ICU_USE_THREADS == 0) */
|
||||
|
||||
/* Threads disabled here */
|
||||
|
||||
U_CAPI int32_t U_EXPORT2
|
||||
umtx_atomic_inc(int32_t *p) {
|
||||
|
|
Loading…
Add table
Reference in a new issue