Re: [patch 3/8] mutex subsystem, add atomic_*_call_if_*() to i386

Ingo Molnar
2005-12-21T19:48:29Z

* Linus Torvalds <torvalds@osdl.org> wrote:

>
> On Wed, 21 Dec 2005, Ingo Molnar wrote:
> >
> > add two new atomic ops to i386: atomic_dec_call_if_negative() and
> > atomic_inc_call_if_nonpositive(), which are conditional-call-if
> > atomic operations. Needed by the new mutex code.
>
> Umm. This asm is broken. It doesn't mark %eax as changed, [...]

hm, i thought gcc treats all explicitly used register in the asm as
clobbered - and i'm using %%eax explicitly for that reason. Or is that
only the case if that's an input/output register as well?

Ingo