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]

[RFC] libstdc++ atomic_flag changes


The issue that I'm trying to solve is that we will have at least two targets whose test-and-set insn does not define "set" as 1, as a variable of type "bool" would expect.  In the case of Sparc we *could* make the test-and-set implementation test for any non-zero value, but in the case of m68k the hw will only test-and-set the msb of the byte.

This compiles on x86_64, and is still undergoing testing, but I wanted to get this out before Ben quits for the day.  ;-)

Notes:
  * I try to leave _M_i as bool if at all possible,
    as this gives the best information to the debugger.

  * The suggestion on IRC to derive private from __atomic_flag_base
    falls afoul of src/c++11/compatibility-atomic-c++0x.cc.
    I'll leave any possible cleanup here to libstdc++ maintainers.  ;-)

  * The changes to the target files actually depend on outstanding patches
    in my tree.  But at least show where the problems would lie.

Did I miss anything?

r~

Attachment: z
Description: Text document


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