* Fixed try_unlock_shared_and_lock_until/for() and
try_unlock_shared_and_lock_upgrade_until/for() so that they wait on the
correct condition variable for the associated predicate.
* Fixed try_unlock_shared_and_lock_until/for() and
try_unlock_upgrade_and_lock_until/for() so that they take the
write_entered_ flag before waiting for all shared readers to unlock. This
prevents new readers from taking a shared lock or new writers from taking
the exclusive lock while these functions are waiting to take the
exclusive lock.
* Changed notify_all() calls to occur while the mutex is being held to be
consistent with the notify_one() calls and the existing
pthread/shared_mutex.hpp implementation.
* Added BOOST_THREAD_PROVIDES_SHARED_MUTEX_UPWARDS_CONVERSIONS ifdefs.
* Added BOOST_ASSERT() statements to verify correct usage and operation.
* Fixed an incorrect test case that the BOOST_ASSERT() statements
uncovered.
* Added comments to explain certain design decisions.
* Added checks for BOOST_THREAD_USES_CHRONO
* Rearranged the order of the functions in v2/shared_mutex.hpp
* No changes were made to the contents of any functions
* Also added comments to the win32 mutex implementations to clarify
how the existing code works
* Also removed a few unnecessary intermediate variables
* Used the predicate version of condition_variable::wait_until() which
correctly handles time jump events.
* Fixed an issue with sync_timed_queue::pull_until()/pull_for() where
they could incorrectly return queue_op_status::timeout instead of
queue_op_status::success.
* Changed sync_timed_queue::wait_pull() to return
queue_op_status::success instead of queue_op_status::closed when the
queue has been closed but an item is available and is ready to be
pulled off the queue.
* Changed sync_priority_queue::pull_until()/pull_for() and
sync_timed_queue::pull_until()/pull_for() to return
queue_op_status::closed instead of throwing an exception when the
queue is closed since they have a queue_op_status return type.
- Added no_interruption_point::sleep() functions to pthreads to be
consistent with Windows.
- Fixed an issue where the no_interruption_point::sleep_*() functions
were still interruptible on Windows.
- This allowed these classes to take advantage of the time jump fixes in condition_variable.
Fixed a minor issue where, if a thread was waiting after calling one of the following functions and it timed out at the same time it was given the lock, it would return false (failure) rather than succeeding.
- mutex::timed_lock()
- mutex::try_lock_for()
- mutex::try_lock_until()
- recursive_mutex::timed_lock()
- recursive_mutex::try_lock_for()
- recursive_mutex::try_lock_until()
- shared_mutex::timed_lock_shared()
- shared_mutex::try_lock_shared_for()
- shared_mutex::try_lock_shared_until()
- 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.
* 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.
* 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.
* Fixed the interruption-point versions of sleep_for/sleep_until() to always use condition variables.
* Fixed the no-interruption-point versions of sleep_for/sleep_until() to use pthread_delay_np or nanosleep whenever possible.
* Updated hidden::sleep_for() to always use a condition variable.
* Updated no_interruption_point::hidden::sleep_for() to use pthread_delay_np or nanosleep whenever possible.
In MSVC-9 MFC sources, _pRawDllMain and ExtRawDllMain accept HINSTANCE as
the first argument, not HANDLE. In strict mode these are different types,
which creates the potential for ODR errors. This commit resolves that
inconsistency.
Resolves https://svn.boost.org/trac10/ticket/12323.