2
0
mirror of https://github.com/boostorg/thread.git synced 2026-01-27 07:22:11 +00:00
Commit Graph

2418 Commits

Author SHA1 Message Date
Austin Beer
847dcbf237 Removed unnecessary explicit qualifiers. 2017-09-29 15:28:04 -06:00
Austin Beer
35d25851ce * Reverted some of my Windows updates to get a condition variable test on Windows to pass again. Further analysis is needed to determine why the updates didn't work.
* Increased the range of one test so it passes on Windows.
2017-09-29 14:52:42 -06:00
Austin Beer
5ffca91e60 * Hopefully fixed the build failure on Mac OS.
* Refactored to use timespec as the internal storage with pthread and intmax_t with Windows.
2017-09-29 10:22:01 -06:00
Austin Beer
51e6e654e3 Re-disabled the three move_ctor_upgrade_lock tests on Windows that are still failing. 2017-09-29 02:17:58 -06:00
Austin Beer
3c25ad09ce Attempting to fix build errors on Windows. 2017-09-29 00:34:47 -06:00
Austin Beer
a2e037bb54 Fixes and Cleanup
- Fixed build failures on Windows. The timespec struct is not supported by older versions of Visual Studio. I changed the internal representation inside of the *_timespec_timepoint classes to a boost::intmax_t representing the number of nanoseconds since the epoch.
- Fixed some functions that wouldn't execute at all if they were provided a negative time duration or an absolute time that was in the past. From what I understand, they should instead execute once and then return immediately.
- Moved pthread/timespec.hpp to detail/timespec.hpp.
- Deleted detail/internal_clock.hpp and moved the seven relevant lines into detail/timespec.hpp. This keeps all of the internal clock declarations in one place.
- Renamed thread_detail::internal_clock_t to detail::internal_chrono_clock to be consistent with and yet clearly differentiated from detail::internal_timespec_clock.
- Removed "using namespace chrono" to eliminate ambiguious namespace resolution when referencing detail::internal_chrono_clock.
- Re-enabled a few tests on Windows that had previously been disabled. I want to see whether or not they still need to be disabled.
2017-09-28 22:27:37 -06:00
Vicente J. Botet Escriba
a4a21b1c12 Merge pull request #166 from austin-beer/feature/timespec_clocks_pr11
Switching the Windows condition_variable and interruptible_wait functions over to using internal_timespec_clock.
2017-09-29 01:56:58 +02:00
Austin Beer
c2b207faa4 Switching the Windows condition_variable and interruptible_wait functions over to using internal_timespec_clock. 2017-09-28 13:24:21 -06:00
Vicente J. Botet Escriba
68abb96818 Merge pull request #165 from austin-beer/feature/timespec_clocks_pr10
Added support for getting time on Windows to the timespec classes.
2017-09-28 08:17:23 +02:00
Austin Beer
29c3b48da0 Switching over to using the existing GetTickCount64() code for reporting monotonic time on Windows. This code is less precise than QueryPerformanceCounter(), but it's more reliable on older versions of Windows (e.g. XP and Server 2003). 2017-09-27 15:40:50 -06:00
Austin Beer
13713f3b9c Added support for getting time on Windows to the timespec classes. 2017-09-27 10:52:53 -06:00
Vicente J. Botet Escriba
776d42f6cb Merge branch 'develop' into feature/timespec_clocks 2017-09-26 08:01:28 +02:00
Vicente J. Botet Escriba
b20ea9ebb1 fix strike characted. 2017-09-26 08:00:44 +02:00
Vicente J. Botet Escriba
46c1ae6f96 Merge branch 'develop' into feature/timespec_clocks 2017-09-26 05:55:40 +02:00
Vicente J. Botet Escriba
f02f23eff5 Add STACK_SIZE_PARAM_IS_A_RESERVATION when setting the stack size. 2017-09-26 05:54:53 +02:00
Vicente J. Botet Escriba
fb0317ec7d Merge pull request #164 from austin-beer/feature/timespec_clocks_pr8
Fixed compile issue on Windows
2017-09-25 19:25:38 +02:00
Austin Beer
417a2d8a46 Fixed compile issue on Windows. 2017-09-25 11:15:09 -06:00
Vicente J. Botet Escriba
ce7f2b09cc try to use again pthread/shared_mutex.hpp on windows. Comment not used functions in timespec. 2017-09-25 12:52:25 +02:00
Vicente J. Botet Escriba
e6226a95ba try to fix future wait on posix duration. 2017-09-25 08:39:45 +02:00
Vicente J. Botet Escriba
aa221d02b5 try to fix issues on linu-mono mutex operation on system_time. 2017-09-25 00:18:12 +02:00
Vicente J. Botet Escriba
5a7d8eca6f Merge pull request #163 from DanielaE/feature/qoi-warning
fix or silence (msvc) compiler warnings about constant conditional ex…
2017-09-24 21:04:34 +02:00
Vicente J. Botet Escriba
de4ee72554 disable some failing unique_lock/upgrade_lock tests on windows. 2017-09-24 20:21:43 +02:00
Vicente J. Botet Escriba
ad5ea75ddd disable tsome failing unique_lock/upgrade_lock tests on windows. 2017-09-24 19:38:34 +02:00
Vicente J. Botet Escriba
dd1b5282b2 try to fix issues with windows and shared_mutex. 2017-09-24 17:29:27 +02:00
Vicente J. Botet Escriba
45321f0570 try to fix issues with new pthread/shared_mutex.hpp on windows by disabling the use of the pthread version that now depends on timespec. 2017-09-24 16:31:42 +02:00
Daniela Engert
4e83359537 fix or silence (msvc) compiler warnings about constant conditional expressions, unused parameters, narrowing, unreachable code, use of 'this' in base member initializations, and some other minor stuff
Signed-off-by: Daniela Engert <dani@ngrt.de>
2017-09-24 14:02:17 +02:00
Vicente J. Botet Escriba
bafc9f43a5 try to fix DateTime time related issues on pthread/shared_mutex.hpp. 2017-09-24 08:12:02 +02:00
Vicente J. Botet Escriba
b98d022d40 try to fix DatTime related functions for mutex/recursive_mutex. 2017-09-23 08:42:02 +02:00
Vicente J. Botet Escriba
f2d6d99d54 Merge pull request #161 from austin-beer/feature/timespec_clocks_pr7
Finished fixing the condition_variable[_any] timed_wait() functions.
2017-09-23 07:00:11 +02:00
Austin Beer
aeb54ddbe5 Finished fixing the condition_variable[_any] timed_wait() functions. 2017-09-22 14:22:06 -06:00
Vicente J. Botet Escriba
4d385bedd3 try to fix condition_variable::timed_wait for pthread. 2017-09-22 04:18:55 +02:00
Vicente J. Botet Escriba
03a2ea4612 Merge pull request #159 from austin-beer/feature/timespec_clocks_pr6
Fixed try_join_* and timed_join functions that were failing time jump tests
2017-09-22 00:37:20 +02:00
Austin Beer
c290fc5f98 Deleted an unused function and added some fixme comments. 2017-09-21 12:59:09 -06:00
Austin Beer
23861b9608 Fixed try_lock_*for() and wait_for() functions that were failing time jump tests. 2017-09-21 12:08:20 -06:00
Austin Beer
24fd5953c9 Fixed timed_join on Windows when the system clock jumps. 2017-09-21 11:27:36 -06:00
Austin Beer
8f51d9c4a7 Fixed try_join_* and timed_join functions that were failing time jump tests 2017-09-21 10:56:53 -06:00
Vicente J. Botet Escriba
5dcc5f6d26 Merge branch 'develop' into feature/timespec_clocks 2017-09-21 18:53:52 +02:00
Vicente J. Botet Escriba
70a4ce8eb3 Merge pull request #158 from austin-beer/feature/timespec_clocks_pr5
Timespec Improvements, Minor Cleanup
2017-09-21 18:50:42 +02:00
Austin Beer
8207b88e97 Made function static 2017-09-21 10:48:58 -06:00
Austin Beer
de7e354a8e Improved the timespec implementation
* Added a constructor to timespec_duration, real_timespec_timepoint, and mono_timespec_timepoint that takes an intmax_t representing the number of nanoseconds in the timespec.
* Added a getNs() function to timespec_duration, real_timespec_timepoint, and mono_timespec_timepoint that returns an intmax_t representing the number of nanoseconds in the timespec.
* Added a timespec_milliseconds() function that takes an integer representing milliseconds and returns a timespec_duration.
* Removed some unnecessary BOOST_SYMBOL_VISIBLE declarations.
* Removed the unnecessary d100 variable declarations.
2017-09-21 09:28:18 -06:00
Vicente J. Botet Escriba
981e993d40 Adjust time constraint to windows. 2017-09-21 08:02:22 +02:00
Vicente J. Botet Escriba
bad686d620 Merge pull request #155 from austin-beer/feature/timespec_clocks_pr4
Chrono-related optimizations
2017-09-21 07:57:12 +02:00
Austin Beer
2f1b1c4d44 Missed a file in the previous commit. 2017-09-20 12:49:22 -06:00
Austin Beer
d8f24d9183 Fixed an issue where the results of Chrono arithmetic operations weren't being assigned to a common type that's guaranteed to compile. 2017-09-20 12:49:22 -06:00
Austin Beer
0fa843532e Eliminated unnecessary convertions to chrono::nanoseconds 2017-09-20 12:49:21 -06:00
Vicente J. Botet Escriba
7b49f3f354 Merge pull request #154 from austin-beer/feature/timespec_clocks_pr3
Cleanup
2017-09-20 20:43:36 +02:00
Austin Beer
e6f876e830 More Cleanup
* Deleted unused sleep_for() overload in pthread/thread_data.hpp.
* Deleted unused and disabled sleep_for() overloads in win32/thread_data.hpp.
2017-09-20 10:10:17 -06:00
Austin Beer
285d35f43f Cleanup
* Deleted a couple of unnecessary calls to internal_clock_t::now() in v2/thread.hpp.
* Deleted the hidden::sleep_until() functions, which are no longer being used.
* Deleted the condition_variable::do_wait_for() function, which is no longer being used.
* Deleted the sleep_mutex and sleep_condition variables in pthread/thread_data.hpp, which are no longer being used.
2017-09-19 16:12:22 -06:00
Vicente J. Botet Escriba
a18dfa1fea Merge branch 'feature/timespec_clocks' of github.com:boostorg/thread into feature/timespec_clocks 2017-09-19 23:46:45 +02:00
Vicente J. Botet Escriba
f5ccff5b6e Merge pull request #153 from austin-beer/feature/timespec_clocks_pr2
Fixed sleep(TimeDuration const& rel_time)
2017-09-19 23:45:45 +02:00