Commit Graph

1335 Commits

Author SHA1 Message Date
Christian Ullrich
86b7ceb05a Fix operator precedence. 2019-04-12 19:35:39 +02:00
Vicente J. Botet Escriba
a645ef761d
Merge pull request #277 from austin-beer/fix_sync_queue_time_jump_issues
Fix sync_timed_queue time jump issues
2019-04-03 20:41:52 +02:00
Austin Beer
2502b2741b Fix "variable set but not used" errors caused by previous commit 2019-04-03 10:49:16 -06:00
Austin Beer
48a4a06f86 Fix Issue 275
* Re-fixed the EINTR bug that exists in some pthreads implementations.
It was originally fixed in https://svn.boost.org/trac10/ticket/6200 and
was accidentally disabled in 5b209c2e83.
* Made sure that the fix for the EINTR bug was consistently applied to
all code in the library.
* Made sure that all pthread_mutex_*() and pthread_cond_*() function
calls in the library were consistently decorated with
BOOST_THREAD_DISABLE_THREAD_SAFETY_ANALYSIS.
2019-04-01 10:00:57 -06:00
Austin Beer
a0b255768e Fix time jump issues that were re-introduced while fixing issue 271
Also fix time jump issues with sync_timed_queue::push_for()
2019-03-30 20:40:24 -06:00
Austin Beer
8aac9047ab Prevent mixing clock types in sync_timed_queue 2019-03-29 16:41:57 -06:00
Austin Beer
d4c2cef0a2 Fix Issue 271
* If thread A was waiting to pull the earliest element off of a
sync_timed_queue, and while it was waiting thread B added a new element with an
earlier time to the queue, thread A wouldn't reduce how long it waited before
pulling the earliest element off of the queue.

* Also refactored a function name and a variable name since their names no
longer accurately described what they do:
*** notify_not_empty_if_needed() -> notify_elem_added()
*** not_empty_ -> cond_

* Also deleted a no-longer-used function:
*** wait_until_closed_until()
2019-03-18 19:16:59 -06:00
Vicente J. Botet Escriba
5d20f5b342 Fix missing includes files and make executors available by default in version 5. 2019-01-20 22:42:12 +01:00
Andrey Semashev
e16786f173 Fixed bugs discovered by the standalone header tests.
- Added missing includes.
- Added missing namespace qualification for Boost.Chrono casts.
- Added typedefs renaming polymorphic lockable wrappers to a more consistent
  naming scheme. This fixes incorrect name references.
- Fixed incorrect duration casts in polymorphic lockable wrappers.
- Renamed upgrade_lockable_adapter to poly_upgrade_lockable_adapter, since
  upgrade_lockable_adapter already exists and has a different meaning.
- Use BOOST_THREAD_FUTURE instead of future in executors and task region.
- Disable serial_executor_cont when executors or future continuations
  are not enabled.
- Marked sync_queue_is_closed exception as visible.
2019-01-19 20:53:33 +03:00
Andrey Semashev
81d4e5a824 Select time-related API based on the threading platform API. 2019-01-06 21:58:09 +03:00
Andrey Semashev
c97b504925
Fix compilation of timed functions on Cygwin.
Cygwin includes both Windows and POSIX API and, depending on the included headers, may have WIN32 macros defined. Since Boost.Thread uses pthread API on Cygwin, it should also enable POSIX API for time units (i.e. timespec).
2019-01-06 17:57:35 +03:00
Vicente J. Botet Escriba
758d087662
Merge pull request #249 from Kojoley/feature/simplify-tss-cleanup
Simplify TSS cleanup routines. Fixes #236
2019-01-03 19:10:52 +01:00
Vicente J. Botet Escriba
f5133ab829
Merge pull request #260 from DesWurstes/patch-1
Fix "interruption_point" defined twice
2019-01-03 19:02:56 +01:00
Andrey Semashev
e942774b90 Fix MinGW warnings about violation of the strict aliasing rules.
Use memcpy to convert between long and the bitfield structure and use
memcmp to compare the two bitfields. Compilers should be smart enough to
optimize away these string operations and generate virtually the same
code as before.
2019-01-03 19:47:48 +03:00
DesWurstes
c90ed87527 Declare "interruption_point" once 2019-01-01 12:49:39 +03:00
Nikita Kniazev
970dcb8afd Simplify TSS cleanup routines. Fixes #236
Instead of wrapping a default or user provided destructor into a virtual
class and placing it into a shared_ptr it is now stored directly with
an elided type, to not introduce UB it is not called directly but through
a helper function which casts it back to the original type before calling.
2018-11-17 15:25:27 +03:00
Romain Geissler
ccb1b99e3f Remove all "throw()" specification to prepare for C++20 where it is removed. 2018-11-11 22:24:38 +00:00
Vicente J. Botet Escriba
e1b5f9d786 Try to catch the CircleCi clang issues. 2018-10-18 18:59:49 +02:00
Vicente J. Botet Escriba
8b5cd5f02a Merge branch 'develop' of https://github.com/boostorg/thread into develop 2018-10-18 07:35:50 +02:00
Vicente J. Botet Escriba
5b2ffe7104 try to fix decay_copy issue with reference to functions: function cannot return function type 2018-10-17 20:54:21 +02:00
Peter Dimov
54871e21a1 Fix uses of BOOST_HAS_WINTHREADS (not correct on Cygwin) 2018-10-13 04:56:08 +03:00
Vicente J. Botet Escriba
e1e4cbf4be
Merge pull request #240 from Kojoley/fix-lockable_traits
Fixed lockable_traits bugs
2018-10-07 19:07:49 +02:00
Nikita Kniazev
9a3b7ff859 Suppress variadic macro warnings
The workaround was stolen from `boost/static_assert.hpp` and works in Clang too
2018-10-05 00:47:03 +03:00
Nikita Kniazev
a35ffa3a83 lockable_traits: Use decltype based methods detection
Traits does not detect methods with `noexcept` qualifiers which are part of
function type in C++17 (P0012R1).
2018-10-04 18:36:38 +03:00
Vicente J. Botet Escriba
acda67baf4
Merge pull request #234 from DjArt/develop
Fixing compiling on VS2017 for ARM & ARM64
2018-10-01 05:49:15 +02:00
Peter Dimov
534f5af9e6 Fix boost::detail::winapi references 2018-09-27 08:58:47 +03:00
Vicente J. Botet Escriba
aaca72e34b Fix __attribute(()) syntax typo. 2018-09-23 15:53:28 +02:00
Vicente J. Botet Escriba
f4b239bab1 fix <:: 2018-09-15 10:17:54 +02:00
Vicente J. Botet Escriba
bf7e79c709 fix <:: 2018-09-15 10:16:25 +02:00
Vicente J. Botet Escriba
8c1d232b8c try to manage with #11477. 2018-09-15 07:11:37 +02:00
Vicente J. Botet Escriba
92a5bc4300 manage with #232 2018-09-15 07:10:05 +02:00
Dj Art
0389f58f23 Fixing compiling on VS2017 for ARM & ARM64 2018-09-15 03:15:04 +08:00
Vicente J. Botet Escriba
5b209c2e83 try to fix thread safety issues raised on FreeBSD. 2018-09-10 23:52:48 +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
68eef9240f try to fix it for C++98. 2018-08-07 17:02:04 +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
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
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
Gregor Jasny
2ef70e02a5 pthread_condattr_setclock must not be used prior to Android 21
Fixes #215
2018-04-12 08:51:44 +02: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
Tom Hughes
1874018c12 Add thread safety annotations for lock_guard 2018-03-01 15:57:00 -08:00
Vicente J. Botet Escriba
040481760c avoid defining twice BOOST_THREAD_WIN32. 2018-02-28 22:16:50 +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
Vicente J. Botet Escriba
e3358e0925 Merge branch 'develop' of github.com:boostorg/thread into develop 2018-02-26 16:23:41 +01:00
Vicente J. Botet Escriba
13a1f3daaa
Merge pull request #211 from Lastique/rewrite_gettickcount64
Rewrite GetTickCount64 emulation implementation.
2018-02-26 16:22:54 +01:00
Vicente J. Botet Escriba
0871d0b0a6 Merge branch 'develop' of github.com:boostorg/thread into develop 2018-02-21 02:13:26 +01:00