This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Re: Re: Adding a new thread model to GCC


On 18 April 2016 at 10:57, Jonathan Wakely wrote:
> On 18 April 2016 at 10:18, lh_mouse wrote:
>>> I don't see why it has to be a struct, it just has to be suitable as
>>> an argument to the relevant __gthread functions.
>>
>> The type __gthread_time_t is referenced in gcc/libstdc++-v3/include/std/mutex:157
>>           __gthread_time_t __ts = {
>>             static_cast<std::time_t>(__s.time_since_epoch().count()),
>>             static_cast<long>(__ns.count())
>>           };
>> This definition uses a braced-init-list that has two elements and is unsuitable for scalar types.
>
> Yes I know.
>
> What I meant is that there's no fundamental reason it needs to be a
> struct. That code could be changed.

However, that code in <mutex> is only needed for timed mutexes, and I
thought you said that wouldn't be supported.

There is code using __gthread_time_t in <condition_variable> that
needs to work even if timed mutexes are not supported.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]