Boost logo

Boost :

From: Alexander Terekhov (terekhov_at_[hidden])
Date: 2005-04-06 11:41:07


Alexander Terekhov wrote:
[...]
> asm long atomic_decrement_strong( register long * pw ) {
>
> <load-reserved>
> <add -1>
> <branch if zero to acquire>
> {lw}sync
>
> loop:
>
> <store-conditional>
> <branch if !failed to done>
> <load-reserved>
> <add -1>
> <branch if !zero to loop>
>
> acquire:
>
> <store-conditional>
> <branch if failed to loop>
> isync
>
> done:
>
> <...>
> }

I meant

 asm long atomic_decrement_strong( register long * pw ) {

      <load-reserved>
      <add -1>
      <branch if zero to acquire>
      {lw}sync

    loop1:

      <store-conditional>
      <branch if !failed to done>

    loop2:

      <load-reserved>
      <add -1>
      <branch if !zero to loop1>

    acquire:

      <store-conditional>
      <branch if failed to loop2>
      isync

    done:

      <...>
  }

regards,
alexander.


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk