2
0
mirror of https://github.com/boostorg/thread.git synced 2026-01-19 04:42:13 +00:00

2812 Commits

Author SHA1 Message Date
Vicente J. Botet Escriba
c550979eff Merge branch 'develop' of https://github.com/boostorg/thread into develop 2018-09-06 07:16:29 +02:00
Vicente J. Botet Escriba
15f2d7a21c fix test not returning boost::report_errors(). 2018-09-06 07:16:17 +02:00
Vicente J. Botet Escriba
371fb42709 Merge pull request #229 from huangqinjin/develop
fix compilation with BOOST_NO_EXCEPTIONS
2018-09-06 06:54:27 +02:00
Fabrice Fontaine
f7581a3662 fix static detection of lock-free atomic ints
When build statically, boost is unable to detect lock-free atomics ints
because it tries to link dynamically with boost_system, see
output/build/boost-1.67.0/bin.v2/config.log (with -d5 option):

Using shell: /bin/sh -c
    argv[0] = '/bin/sh'
    argv[1] = '-c'
    argv[2] = '
    "/home/fabrice/buildroot/output/host/bin/arm-linux-g++"   -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64  -Os   -Wl,-elf2flt -static  -Wl,-elf2flt -static -fPIC -pthread -O0 -fno-inline -Wall -pedantic -g -Wextra -Wno-long-long -Wno-unused-parameter -Wunused-function -pedantic -DBOOST_ALL_NO_LIB=1 -DBOOST_SYSTEM_DYN_LINK=1 -DBOOST_THREAD_BUILD_DLL=1  -I"." -c -o "bin.v2/libs/thread/build/gcc-6.4.0/debug/threading-multi/has_atomic_flag_lockfree_test.o" "libs/thread/src/../build/has_atomic_flag_lockfree_test.cpp"
'
gcc.compile.c++ bin.v2/libs/thread/build/gcc-6.4.0/debug/threading-multi/has_atomic_flag_lockfree_test.o

    "/home/fabrice/buildroot/output/host/bin/arm-linux-g++"   -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64  -Os   -Wl,-elf2flt -static  -Wl,-elf2flt -static -fPIC -pthread -O0 -fno-inline -Wall -pedantic -g -Wextra -Wno-long-long -Wno-unused-parameter -Wunused-function -pedantic -DBOOST_ALL_NO_LIB=1 -DBOOST_SYSTEM_DYN_LINK=1 -DBOOST_THREAD_BUILD_DLL=1  -I"." -c -o "bin.v2/libs/thread/build/gcc-6.4.0/debug/threading-multi/has_atomic_flag_lockfree_test.o" "libs/thread/src/../build/has_atomic_flag_lockfree_test.cpp"

0.033561 sec system; 0.126314 sec user; 288.682473 sec clock
gcc.compile.c++ bin.v2/libs/system/build/gcc-6.4.0/debug/threading-multi/error_code.o

    "/home/fabrice/buildroot/output/host/bin/arm-linux-g++"   -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64  -Os   -Wl,-elf2flt -static  -Wl,-elf2flt -static -fPIC -pthread -O0 -fno-inline -Wall -pedantic -g  -DBOOST_ALL_NO_LIB=1 -DBOOST_SYSTEM_DYN_LINK=1  -I"." -c -o "bin.v2/libs/system/build/gcc-6.4.0/debug/threading-multi/error_code.o" "libs/system/src/error_code.cpp"

0.084060 sec system; 0.644133 sec user; 8.858824 sec clock
SEM: <s>gcc-link-semaphore now used by <pbin.v2/libs/system/build/gcc-6.4.0/debug/threading-multi>libboost_system.so.1.67.0
Using shell: /bin/sh -c
    argv[0] = '/bin/sh'
    argv[1] = '-c'
    argv[2] = '
    "/home/fabrice/buildroot/output/host/bin/arm-linux-g++"    -o "bin.v2/libs/system/build/gcc-6.4.0/debug/threading-multi/libboost_system.so.1.67.0" -Wl,-h -Wl,libboost_system.so.1.67.0 -shared -Wl,--start-group "bin.v2/libs/system/build/gcc-6.4.0/debug/threading-multi/error_code.o"  -Wl,-Bstatic  -Wl,-Bdynamic -lrt -Wl,--end-group -fPIC -pthread -g  -Wl,-elf2flt -static
'
gcc.link.dll bin.v2/libs/system/build/gcc-6.4.0/debug/threading-multi/libboost_system.so.1.67.0

    "/home/fabrice/buildroot/output/host/bin/arm-linux-g++"    -o "bin.v2/libs/system/build/gcc-6.4.0/debug/threading-multi/libboost_system.so.1.67.0" -Wl,-h -Wl,libboost_system.so.1.67.0 -shared -Wl,--start-group "bin.v2/libs/system/build/gcc-6.4.0/debug/threading-multi/error_code.o"  -Wl,-Bstatic  -Wl,-Bdynamic -lrt -Wl,--end-group -fPIC -pthread -g  -Wl,-elf2flt -static

ld (ld-elf2flt): -shared used without passing a shared library ID
collect2: error: ld a retourné le statut de sortie 1
0.003123 sec system; 0.004732 sec user; 15.646509 sec clock
...failed gcc.link.dll bin.v2/libs/system/build/gcc-6.4.0/debug/threading-multi/libboost_system.so.1.67.0...

To fix this, move the exe statement before the boost/thread project

Fixes:
 - http://autobuild.buildroot.org/results/f46d38991385cbc2a4fa14eb31074e770cd79803

Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
2018-09-05 12:24:04 +02:00
huangqinjin
e54f7e3960 fix warning: comparison of unsigned expression < 0 2018-08-31 13:53:54 +08:00
huangqinjin
d1284b02ad fix compilation with BOOST_NO_EXCEPTIONS 2018-08-31 10:54:35 +08:00
Vicente J. Botet Escriba
c5e756d196 Merge pull request #227 from kivadiu/develop
Fixed warning cast between incompatible function types from FARPROC_ to gettickcount64_t
2018-08-09 22:52:06 +02:00
Frédéric Bron
ee607c86d4 Fixed warning cast between incompatible function types from FARPROC_ to gettickcount64_t
On Windows, GetProcAddress must be cast to something useful which
generates a warning with gcc. This patch silents the warning.

Fixes issue #225
2018-08-09 10:16:05 +02:00
Vicente J. Botet Escriba
68eef9240f try to fix it for C++98. 2018-08-07 17:02:04 +02:00
Vicente J. Botet Escriba
de7608f067 manage #224: thread::physical_concurrency() allocates a buffer that is bigger than necessary. 2018-08-07 14:19:32 +02:00
Vicente J. Botet Escriba
743f2a0348 manage #226: 1.68 thread pool join do interruption. 2018-08-07 14:15:18 +02:00
Vicente J. Botet Escriba
d8d549cf3e manage #13561. 2018-08-07 13:54:35 +02:00
Vicente J. Botet Escriba
fc08c1fe28 Merge pull request #220 from thughes/feature/test_measure_sleep_time
Account for sleep time in timing tests
2018-04-28 17:47:37 +02:00
Tom Hughes
dce24d5b43 Use default test timing, except mac
The condition variable wait tests are still a little flaky on CircleCI
since we can't account for overwaiting with pthread_cond_timedwait

See https://circleci.com/gh/thughes/thread/483
2018-04-27 12:03:49 -07:00
Tom Hughes
b45ae62791 Use macro for comparison so times are printed on failure 2018-04-27 12:03:49 -07:00
Tom Hughes
b0485bafdd Reduce parallel build jobs on CircleCI
The Linux executors have 2 CPUs and the macOS executors have 4. The
build time does speed up as we increase the number of parallel jobs to
10, but the tests that rely on timing measurements start to fail.
2018-04-27 12:03:49 -07:00
Tom Hughes
3b52a8950f Subtract measured sleep time instead of constant 250 ms
boost::this_thread::sleep_for is allowed to sleep longer than the
requested sleep time. This seems to happen especially on virtualized
systems, such as CircleCI.
2018-04-27 12:03:49 -07:00
Vicente J. Botet Escriba
e60f66e023 Merge pull request #219 from thughes/feature/remove_racy_checks
Remove racy checks
2018-04-27 14:43:14 +02:00
Tom Hughes
2a68582676 Remove racy check
This check may or may not be true depending on how long it takes pt1 to
finish executing. You can verify this by adding a sleep before the check
in which case "is_ready()" is always true.
2018-04-26 07:30:43 -07:00
Tom Hughes
b7ebda0f15 Remove racy check
This check may or may not be true depending on how long it takes p1 to
finish executing. You can verify this by adding a sleep before the check
in which case "is_ready()" is always true.
2018-04-26 07:30:33 -07:00
Vicente J. Botet Escriba
7b2289a1c5 Merge pull request #212 from thughes/feature/add_thread_safety_annotations
Add clang thread-safety annotations to boost::mutex (pthread-only)
2018-04-25 19:13:05 +02:00
Vicente J. Botet Escriba
377bb87ad5 Merge branch 'develop' boost-1.68.0 2018-04-18 17:51:46 +02:00
Vicente J. Botet Escriba
180ca01c97 Merge pull request #217 from jschueller/patch-1
Windows.h > windows.h
2018-04-15 10:37:11 +02:00
Julien Schueller
a6dede8199 Windows.h > windows.h
Fixes build on case-sensitive fs
2018-04-15 08:33:56 +02:00
Vicente J. Botet Escriba
25b915308a Added test for 13480. 2018-04-14 09:26:31 +02:00
Vicente J. Botet Escriba
079871ffac Merge branch 'develop' of github.com:boostorg/thread into develop 2018-04-13 20:06:50 +02:00
Vicente J. Botet Escriba
4d62627668 Make it possible to compile with BOOST_NO_EXCEPTIONS defined 2018-04-13 20:06:03 +02:00
Vicente J. Botet Escriba
2b88759f43 fix unused local vars. 2018-04-13 13:50:49 +02:00
Vicente J. Botet Escriba
d60968b61c Update boost-1.67 history. 2018-04-13 11:23:10 +02:00
Vicente J. Botet Escriba
5aad4ac056 Merge pull request #216 from gjasny/android-monotonic
pthread_condattr_setclock must not be used prior to Android 21
2018-04-12 09:06:51 +02:00
Gregor Jasny
2ef70e02a5 pthread_condattr_setclock must not be used prior to Android 21
Fixes #215
2018-04-12 08:51:44 +02:00
Vicente J. Botet Escriba
f525a18239 Merge pull request #214 from Lastique/patch-6
Update GetTickCount64 calling convention macro.
2018-03-11 08:45:31 -05:00
Andrey Semashev
5c2dd21508 Update GetTickCount64 calling convention macro.
Boost.WinAPI no longer defines WINAPI calling convention macro and instead defines its own equivalent macro BOOST_WINAPI_WINAPI_CC.
2018-03-11 02:13:36 +03:00
Vicente J. Botet Escriba
6d9aaff58a Increase the time for CircleCI/linux-xxx to 100ms :( 2018-03-08 23:30:53 +01:00
Vicente J. Botet Escriba
db72b0477d Increase the time for CircleCI/mac-clang to 170ms :( 2018-03-08 22:29:39 +01:00
Vicente J. Botet Escriba
1f08b38461 Make the timing check configurable. 2018-03-08 20:39:09 +01:00
Vicente J. Botet Escriba
8cffb15e1e add missing test file. 2018-03-08 07:50:45 +01:00
Vicente J. Botet Escriba
3f1590bce7 fix CircleCI script. 2018-03-08 00:42:31 +01:00
Vicente J. Botet Escriba
37e5c6513c Make configurable the timing. Set 100ms for MacOs and 75ms for Linux on CircleCI. 2018-03-08 00:28:51 +01:00
Vicente J. Botet Escriba
7585187d1c dump delta timing to see when there is a timing issue. 2018-03-07 23:20:36 +01:00
Vicente J. Botet Escriba
8764a5b3dd Merge pull request #213 from thughes/feature/add_circleci
Add CircleCI build
2018-03-07 19:53:35 +01:00
Tom Hughes
9f9feca70c Add CircleCI build 2018-03-05 09:11:04 -08:00
Vicente J. Botet Escriba
d268106bf8 Merge branch 'develop' boost-1.67.0 2018-03-04 23:12:43 +01:00
Tom Hughes
1874018c12 Add thread safety annotations for lock_guard 2018-03-01 15:57:00 -08:00
Tom Hughes
d78a0ca53f Remove clang toolset from target requirements
This forces clang to be used regardless of the toolset configured
2018-02-28 15:51:38 -08:00
Tom Hughes
d1ef6369d9 Fix bjam thread safety compile rules so they only build with clang 2018-02-28 13:33:09 -08:00
Vicente J. Botet Escriba
040481760c avoid defining twice BOOST_THREAD_WIN32. 2018-02-28 22:16:50 +01:00
Vicente J. Botet Escriba
e848363029 Added define for WIN32 when threadapi is win32. 2018-02-28 18:32:27 +01:00
Tom Hughes
8ce9826d98 Prefix macros with BOOST_THREAD 2018-02-27 16:51:10 -08:00
Tom Hughes
5fa7ae14b9 Add clang thread-safety annotations to boost::mutex (pthread-only) 2018-02-27 09:30:49 -08:00