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

libstdc++ atomicity.h and ppc405 problem (was: RE: Regression test for thread safety?)

Loren James Rittle wrote:
> It would be *very* helpful to the GCC project if you could report
> whether GCC 3.1 fixes your problem.

It probably doesn't.  A coworker, Jan Olderdissen, found a
possible cause; according to ppc405 erratum #77 in
the STWCX instruction is buggy in the ppc405; since it is used by
and that file hasn't changed in two years, the bug is 
probably still there.

That document says:

    For stwcx. instructions that are executed in user mode,
    perform the following sequence to mask asynchronous interrupts
    (MSR[CE,EE,ME,DE]) before executing the stwcx....:
      sc (with parameter to mask asynchronous interrupts)
      sc (with parameter to unmask asynchronous interrupts)

    Note that the system call handler may have to be updated
    to support parameters to mask and unmask asynchronous interrupts.

I'm not familiar enough with the ppc405 to know whether there's
a generic way of doing what they suggest, or whether it's board dependent.

Does anyone happen to have an atomicity.h that works around this
problem on the ppc405?


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