Commit graph

63 commits

Author SHA1 Message Date
Andy Heninger
85705f04e0 ICU-21960 C++20 Warnings from ATOMIC_VAR_INIT
Remove the ICU macros ATOMIC_INT32_T_INITIALIZER and U_INITONCE_INITIALIZER,
which made use of C++ ATOMIC_VAR_INIT, which has been removed from C++20.

With modern C++ features being available, these macros no longer served
any real need.
2022-05-17 15:45:06 -07:00
Markus Scherer
18c4a69f80 ICU-9961 replace U_DRAFT/U_STABLE/U_INTERNAL with U_CAPI 2020-09-10 11:23:44 -07:00
Jeff Genovy
77fcded28b ICU-20969 Fix file permissions (-x) on ICU4C source files. 2020-02-19 17:00:06 -08:00
Markus Scherer
e5381c956b ICU-20845 UMutex not trivially but constexpr constructible 2019-10-02 11:00:19 -07:00
Filip Filmar
0a01b29005 ICU-20776 Checks for nullness in UMutex::lock()
Adds `U_ASSERT` check before using `m->lock()` to make allocation issues
more apparent at least in debug builds.

There is probably quite a few places like this, but let's try fixing
broken windows.
2019-08-21 11:21:24 -07:00
Jeff Genovy
e72290c45e ICU-13764 Add separate CI build that treats warnings as errors with clang.
This adds a separate CI build that enables -Werror for clang.

This also fixes all of the -Wall -Wextra warnings in the tests, and all the
-Wextra-semi warnings as well.
2019-07-30 22:10:02 -07:00
Andy Heninger
afa9b9b48e ICU-20588 UMutex, add cleanup of underlying mutexes, and simplify usage model 2019-05-24 13:24:59 -07:00
Andy Heninger
b772241b52 ICU-20520 UMutex refactoring.
- Use STATIC_NEW for mutex creation, to avoid order-of-destruction problems
    by avoiding destruction altogether, while avoiding memory leak reports.

  - Remove UConditionVar, replace with direct use of std::condition_variable
2019-05-07 13:50:49 -07:00
Shane Carr
b596462d5a ICU-20508 Fixing -Wextra-semi in library code. 2019-03-22 15:29:45 -07:00
Jeff Genovy
e96724b52f ICU-20323 Suppress MSYS2 GCC warning about std::atomic visibility (Windows). 2019-01-18 10:14:58 -08:00
Andy Heninger
47d455a725 ICU-20179 Remove platform-specific mutex and atomics implementations.
Remove all POSIX and Win32 specific mutex, atomic and threading implementations
in favor of C++11 std library functions.

Move the related (internal) ICU types and functions into the icu namespace.
2018-11-19 17:17:09 -08:00
Andy Heninger
6c781b1428 ICU-10183 Use std::mutex by default; clean up related dependency check issues. 2018-11-18 16:28:40 -08:00
Andy Heninger
776b9d7f2b ICU-20185 Remove U_USER_ATOMICS_H, U_USER_MUTEX_H, U_USER_MUTEX_CPP 2018-11-13 14:48:48 -08:00
Andy Heninger
f71796d5e5 ICU-10183 Mutexes, add C++11 std::mutex based implementation. 2018-10-31 13:07:19 -07:00
Jeff Genovy
5a34bfb151 ICU-20209 Fix build failures on Windows with std::atomic not in enclosing namespace std
Also: Change to use the ICU namespace macro instead, and skip doxygen as well.
2018-10-29 15:07:05 -07:00
Jeff Genovy
db05e18f28
ICU-20157 Fix MSVC C4251: Need to export explicit template instantiation, plus some more warning fixes. (#154)
* Fix MSVC C4251: Need to export explicit template instantiation for std::atomic<int32_t> when building DLLs

* Some more warning fixes for MSVC as well.

* Can't use static_cast in C file.
2018-09-27 14:27:41 -07:00
Jeff Genovy
e9946ec98e ICU-13027 - Merge in changes from 'branches/shawnste/working/icu4c'
X-SVN-Rev: 39890
2017-03-21 01:03:49 +00:00
Andy Heninger
242e02c388 ICU-12764 icu4c utf-8 source files, update Copyright notices.
X-SVN-Rev: 39583
2017-01-20 00:20:31 +00:00
Steven R. Loomis
3ea904d734 ICU-12783 umutex patch for cygwin, merge r39417
X-SVN-Rev: 39422
2016-10-04 04:01:33 +00:00
Steven R. Loomis
5f2c294d1c ICU-12752 fix breakage from r39368 on windows.
X-SVN-Rev: 39374
2016-09-28 02:26:02 +00:00
Steven R. Loomis
6825277072 ICU-12752 commit some IBM z fixes. Library code building
X-SVN-Rev: 39368
2016-09-27 23:39:01 +00:00
Michael Ow
61607c2773 ICU-12564 Update copyright notice in trunk
X-SVN-Rev: 38848
2016-06-15 18:58:17 +00:00
Yoshito Umaoka
00ca13e126 ICU-12564 Reverted r38761 and r38762, because we want to prepend the Unicode copyright for existing source files, instead of replacing copyright comments.
X-SVN-Rev: 38776
2016-05-31 21:45:07 +00:00
Michael Ow
c9f199a30f ICU-12564 Update copyright notice in ICU4C
X-SVN-Rev: 38761
2016-05-26 22:32:17 +00:00
Andy Heninger
d3301f2a4e ICU-11599 Adjust atomic ops code to be more compatible with thread sanitizer tools.
X-SVN-Rev: 37326
2015-04-09 23:16:55 +00:00
Andy Heninger
96835f80a5 ICU-10948 Condition Variables, merged from development branch.
X-SVN-Rev: 36101
2014-07-29 23:18:47 +00:00
Andy Heninger
2fcbf4c898 ICU-10486 Windows build problem with U_USING_ICU_NAMESPACE=0
X-SVN-Rev: 34586
2013-10-18 20:05:25 +00:00
Andy Heninger
216de3bb95 ICU-10365 Fix typo in previous commit that broke the build on several platforms.
X-SVN-Rev: 34214
2013-09-06 04:14:48 +00:00
Andy Heninger
bb7e5684de ICU-10365 Mutex implementation, use ICU namespace where possible, cleans up urename.
X-SVN-Rev: 34209
2013-09-06 01:41:14 +00:00
Andy Heninger
45561757cc ICU-10182 Build Time mutexes, merge from development branch.
X-SVN-Rev: 34139
2013-08-30 01:23:42 +00:00
Steven R. Loomis
80597323f8 ICU-10331 fix immediate issue on cygwin, mingw still broken. also fix warnings and spaces
X-SVN-Rev: 34133
2013-08-29 21:36:06 +00:00
Andy Heninger
0061d3a9b7 ICU-10184 umutex.h, change to C++ only, in preparation for build time user mutex support.
X-SVN-Rev: 34029
2013-08-09 19:53:07 +00:00
Andy Heninger
ae87a3acc2 ICU-10051 Mutexes: introduce UInitOnce; remove UMTX_CHECK; replace all uses of UMTX_CHECK. All the directories this time.
X-SVN-Rev: 33788
2013-06-01 03:37:16 +00:00
Michael Ow
0edd67f4ef ICU-9642 Fix retypedef of UMutex error
X-SVN-Rev: 32586
2012-10-10 03:51:23 +00:00
Andy Heninger
803ac8f33c ICU-9461 Mutex Implementation Rework, merge from devel branch.
X-SVN-Rev: 32530
2012-10-05 21:22:02 +00:00
Markus Scherer
00dc45723c ICU-9010 remove --disable-threads, move ICU_USE_THREADS out of uconfig.h into test code
X-SVN-Rev: 31911
2012-06-06 04:13:28 +00:00
Markus Scherer
ca12d6d5bd ICU-8730 move some @internal, rarely-used platform macros to putilimp.h
X-SVN-Rev: 30432
2011-07-27 20:55:09 +00:00
Markus Scherer
9bcc40cf9e ICU-8452 un-autoconf platform.h, move user-configurable settings to uconfig.h, and other changes; from svn merge --reintegrate branches/markus/platformh at r30411
X-SVN-Rev: 30412
2011-07-23 00:10:30 +00:00
Michael Ow
1836eb2957 ICU-8682 Use ReadWriteBarrier only on MSVC 9 and higher.
X-SVN-Rev: 30408
2011-07-22 20:29:09 +00:00
Andy Heninger
2a669af439 ICU-8161 Mac compile errors on mutex changes fixed.
X-SVN-Rev: 29703
2011-03-29 04:02:06 +00:00
Andy Heninger
040bb01ac4 ICU-8161 Mutexes, add thread checker annotations, improve singleton implementation.
X-SVN-Rev: 29702
2011-03-29 00:47:41 +00:00
Andy Heninger
0c2a587a9c ICU-6480 clean up UMTX_CHECK usage in lazy init
X-SVN-Rev: 24439
2008-08-05 00:09:13 +00:00
George Rhoten
dbc0d1d9ee ICU-5349 Use UMTX_CHECK for double check locking.
X-SVN-Rev: 20176
2006-08-29 04:57:05 +00:00
George Rhoten
599dbb508c ICU-4288 Fix some compiler warnings.
X-SVN-Rev: 17399
2005-03-25 23:24:47 +00:00
George Rhoten
ac893ce00e ICU-4288 Fix some compiler warnings.
X-SVN-Rev: 16926
2004-12-07 23:43:48 +00:00
Markus Scherer
9f84b31d3a ICU-3969 add macro for lazy initialization check
X-SVN-Rev: 16256
2004-09-06 15:41:52 +00:00
Eric Mader
6aac9dbeb8 ICU-3473 Update copyright notices for ICU 2.8.
X-SVN-Rev: 14180
2003-12-18 23:16:48 +00:00
Andy Heninger
112137af62 ICU-3014 Revised ICU initialization code
X-SVN-Rev: 12970
2003-08-28 00:00:00 +00:00
Andy Heninger
aedb354246 ICU-3156 u_setMutexFunctions(), cleanup to mutex implementation
X-SVN-Rev: 12787
2003-08-08 16:23:38 +00:00
Andy Heninger
ed7b79ac52 ICU-3156 u_setMemoryFuncs(), partial u_setMutexFunctions()
X-SVN-Rev: 12760
2003-08-05 01:25:54 +00:00