This is the mail archive of the gcc-patches@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]

[v3] mutex duplicate removal


This merges various mutex code scattered around the library into
ext/concurrence.h. In doing so, all duplicate effort has been
eliminated, and mutexes construction and initialization should now be
done in a consistent way throughout the library.

Two include files were moved from bits to ext, since they are
extensions and already in namespace __gnu_cxx, and should have been in
this include directory from the beginning.

I think some of the loops for threaded code could become simpler. I
believe with -02, gcc can now optimize

if (0)
 do_this;
else
  do_that;

to:
  do_that;

Since __gthread_active_p() is 0 on systems without defined(__GTHREADS)
the obvious cleanup (not attempted) could be applied.

-benjamin

tested x86/linux
tested x86/linux --disable-threads
tested x86/linux abi

Attachment: p.20060913.bz2
Description: BZip2 compressed data


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