Hi Ruben! On Mon, Jan 31, 2011 at 2:59 PM, Ruben Van Boxem <[email protected]> wrote: > 2011/1/31 K. Frank <[email protected]> >> >> Hello Ruben! >> >> On Mon, Jan 31, 2011 at 9:54 AM, Ruben Van Boxem >> <[email protected]> wrote: >> > Hi guys, >> > ... >> > And the projects libc++ needs some love as well (I'm mostly looking at >> > the xlocale.h issue and perhaps threading, because I thought someone >> > here had an implementation of std::thread using Windows Vista+ >> > primitives?) >> >> Yes, the Vista+ std::thread stuff was me. >> ... >> (For example, the gthr "interface" is very pthreads-like. So if >> the ("unix" version of) libc++'s std::thread is implemented in >> terms of a pthreads-like lower-level interface, then reusing my >> stuff might not be too hard.) > > The current std::thread implementation is purely pthreads-based (libc++ was > written with Mac OS X in mind). > >> Whether in the existing libstdc++ or the new libc++, I would be >> happy to see my std::thread support incorporated into a windows >> version (e.g., mingw32 / mingw-w64) version of gcc. > > Me too, and I'm liking Clang and the idea of a new fresh C++0x designed > libc++ for some reason :)
I have a question about clang / libc++: Is libc++ tied to / part of clang? Or is libc++ being considered for incorporation into gcc (as a replacement for libstdc++, if this is more or less what it is)? > I'll see what I can do to integrate your code into Clang (with author==you > of course ;-) ). Where can I find your code (I seem to have misplaced the > email describing the location of your code :). Is it OK if I submit your > code to the LLVM project (MIT license)? I'm not a license guru, but I believe that the MIT license is okay. The code is located on my hard drive. Note, I have not built a gcc distribution that uses my std::thread support, and have not fully integrated thread support with the gcc code base. Instead, my code is modular, and is mostly external to the gcc code base. What I did is write a gthr-exp.h file that contains most of the implementation (i.e., inline functions), a relatively small gthr-exp.c file for what couldn't go in gthr-exp.h (from memory initializing something to be run by __gthread_once), and made very minor tweaks to things like gthr.h (to include gthr-exp.h) and thread.cc (to patch some minor incompatibilities). Then, because most of the functionality of thread.cc and related files is turned off by "#if defined(_GLIBCXX_HAS_GTHREADS)", which was presumably not defined when the libraries in the mingw32 / mingw-w64 distributions were compiled, I have to define _GLIBCXX_HAS_GTHREADS in my compile command and include thread.cc (and related) in my compile command as source files. Again, I do not have a modified or patched gcc code base, and I have not built a gcc distribution. If somebody with interest knows how to build gcc from source, I think together could integrate the std::thread support into it relatively easily. But the above description of what I have should give you some sense of what the job would entail. (I have no idea what the clang or libc++ code base looks like, so I can't really say what it would take to do this for clang / libc++.) > > @Kai: I believe you were working on winpthreads. Would it be OK to integrate > this into libc++ or should this be part of the mingw runtime regardless and > be used/linked like that? (I will comment on pthreads in a reply to Kai's posting.) > Thanks, > > Ruben Please let me know if there is anything else I can tell you about what I've got. Best. K. Frank ------------------------------------------------------------------------------ Special Offer-- Download ArcSight Logger for FREE (a $49 USD value)! Finally, a world-class log management solution at an even better price-free! Download using promo code Free_Logger_4_Dev2Dev. Offer expires February 28th, so secure your free ArcSight Logger TODAY! http://p.sf.net/sfu/arcsight-sfd2d _______________________________________________ Mingw-w64-public mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/mingw-w64-public
