[PATCH, v3] Bringing <mutex> and <condition_variable> up to spec.

Benjamin Kosnik bkoz@redhat.com
Wed Jul 23 18:54:00 GMT 2008


> Attached patch brings <mutex> and <condition_variable> up to spec
> (n2691 WD) given that <chrono> is now in.

Excellent, thanks. This looks good to me.
 
> I included stubs for timed_mutex and timed_recursive_mutex but when I
> went to attempt a basic implementation I noticed that the gthread API
> doesn't include pthread_mutex_timedlock and/or pthread_cond_timedwait
> if they're available. Should it?

Yes.
 
> Other general questions,
> Is the thread API in the current working draft stable enough to
> complete the implementation?

I believe it should be attempted, and I would encourage you to work on
it.

> Are there required additions/changes to backend thread-support code
> (like gthreads)?

Yes, you'll have to hack the gthread layer to add some of the
required functionality. I posted some preliminary work on this 20080318,
but then only merged in the changes that didn't require new
functionality (ie, <mutex> minus time.) 

So, in this general form:
http://gcc.gnu.org/ml/gcc-patches/2008-05/msg00057.html

But for the rest of this stuff. :) Also, Mark Mitchell needs to review
and OK before checkin.

I had been holding off on the preliminary bits for <thread> for this
same reason. 

-benjamin



More information about the Gcc-patches mailing list