This is the mail archive of the libstdc++@gcc.gnu.org mailing list for the libstdc++ 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: gthread API for c++0x thread lib


Chris Fairles wrote:
I'm currently attempting to update the gthread API to implement
c++0x's thread library. Attached is a half-baked patch with my current
progress but besides gthr-posix.h, I'm basically programming blind
(i.e. no way to test) and so before I go any further I need some
advice/direction on how to progress from here.

Thus far I've been stuffing extra function prototypes and def'ns
around the ObjC stuff but there's overlap and I'm not sure how to
handle it (i.e. duplicated "gthrw" decl's of some pthread funcs).
Should any additions required by c++0x be guarded by some defined
macro (kind of like the objc stuff is guarded)?

Would you please provide some context about what you're trying to do here? As I understand it, you need some new functions in the generic thread interface to implement new functionality in libstdc++? Is this functionality going to be required on all platforms for libstdc++ to operate, or is it just required to use the new features?


If the latter, then I would suggest that you focus just on the generic "gthr.h" header and the POSIX implementation. Make sure that libstdc++ checks that the functions are present, either statically (through autoconf checks, and remember that you may link -- but not run -- programs to do the check), or dynamically (by checking return values). Then, people with other threading environments can fill in the blanks as necessary.

As for Objective-C, you're going to need to track down one of the Objective-C maintainers:

objective-c/c++         Mike Stump              mrs@apple.com
objective-c/c++         Stan Shebs              stanshebs@earthlink.net
libobjc                 Nicola Pero             n.pero@mi.flashnet.it
libobjc                 Andrew Pinski           pinskia@gmail.com

to work out what the interactions are there.

Thanks,

--
Mark Mitchell
CodeSourcery
mark@codesourcery.com
(650) 331-3385 x713


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