Re: Adding a clockid_t parameter to functions that accept absolute timespecs

2018-11-26 Thread Mike Crowe
On Sunday 04 November 2018 at 10:32:38 +, Mike Crowe wrote: > * Function naming: > > Several proposals have been made for naming: I only had one reply to the naming suggestions below, so I've combed through prior emails looking for preferences there. I apologise if I missed your p

Re: Adding a clockid_t parameter to functions that accept absolute timespecs (was Re: C++ condition_variable and timed_mutex with steady_clock and pthreads)

2018-10-27 Thread Mike Crowe
On Saturday 27 October 2018 at 17:07:00 -0400, Daniel Eischen wrote: > The nice thing about being able to set the clock in an attribute or some > other way (e.g., pthread_set_preferred_clock) is that you only have to do > it once, as opposed to potentially modifying lots of other code, even in >

Adding a clockid_t parameter to functions that accept absolute timespecs (was Re: C++ condition_variable and timed_mutex with steady_clock and pthreads)

2018-10-27 Thread Mike Crowe
On Saturday 27 October 2018 at 15:26:07 -0400, Daniel Eischen wrote: > > > On Oct 27, 2018, at 12:14 PM, Mike Crowe > > wrote: > > Looking through POSIX Base Specifications Issue 7, I > > believe that the following other functions lack a way to use > > CLO

Re: C++ condition_variable and timed_mutex with steady_clock and pthreads

2018-10-27 Thread Mike Crowe
On Tue, Oct 9, 2018 at 6:19 AM Mike Crowe wrote: >> So, my favourite solution is to invent an equivalent of >> pthread_cond_timedwait that accepts a clockid_t since it feels more >> future-proof, but adding the Android pthread_cond_timedwait_monotonic >> instead would s

Re: C++ condition_variable and timed_mutex with steady_clock and pthreads

2018-10-09 Thread Mike Crowe
On Monday 08 October 2018 at 22:06:10 -0400, Daniel Eischen wrote: > > > On Oct 8, 2018, at 1:43 PM, enh wrote: > > > >> On Sat, Oct 6, 2018 at 12:09 PM Mike Crowe > >> wrote: > >> > >>> On Wednesday 12 September 2018 at 13:47:59 -0700,

Re: C++ condition_variable and timed_mutex with steady_clock and pthreads

2018-10-07 Thread Mike Crowe
On Saturday 06 October 2018 at 17:43:06 -0400, Daniel Eischen wrote: > > > On Oct 6, 2018, at 3:00 PM, Mike Crowe wrote: > > > > Thank you for your detailed responses and patch links. I'm sorry it's taken > > me so long to respond. I was waiting to see if there we

Re: C++ condition_variable and timed_mutex with steady_clock and pthreads

2018-10-06 Thread Mike Crowe
On Wednesday 12 September 2018 at 13:47:59 -0700, Tom Cherry wrote: > On Wed, Sep 12, 2018 at 11:56 AM Mike Crowe > wrote: > > > > On Wednesday 12 September 2018 at 11:29:26 -0700, Tom Cherry wrote: > > > On Sun, Sep 9, 2018 at 8:28 AM Mike Crowe > > > w

Re: C++ condition_variable and timed_mutex with steady_clock and pthreads

2018-09-12 Thread Mike Crowe
On Wednesday 12 September 2018 at 11:29:26 -0700, Tom Cherry wrote: > On Sun, Sep 9, 2018 at 8:28 AM Mike Crowe wrote: > > > > On Thursday 30 August 2018 at 21:10:48 +0100, Mike Crowe wrote: > > > C++11's std::condition_variable, std::timed_mutex and > > > s

Re: C++ condition_variable and timed_mutex with steady_clock and pthreads

2018-09-09 Thread Mike Crowe
On Thursday 30 August 2018 at 21:10:48 +0100, Mike Crowe wrote: > C++11's std::condition_variable, std::timed_mutex and > std::recursive_timed_mutex support waiting with a timeout specified using > an arbitrary clock. It's common to use std::chrono::steady_clock (which >

C++ condition_variable and timed_mutex with steady_clock and pthreads

2018-08-30 Thread Mike Crowe
C++11's std::condition_variable, std::timed_mutex and std::recursive_timed_mutex support waiting with a timeout specified using an arbitrary clock. It's common to use std::chrono::steady_clock (which corresponds to CLOCK_MONOTONIC) or std::chrono::system_clock (which corresponds to CLOCK_REALTIME)