gnu asm help...

From: Raj, Ashok (ashok.raj@intel.com)
Date: Mon Jun 18 2001 - 17:56:50 EST


Hello asm gurus..

I need a simple (??) change to atomic_inc() functionality. so that i can
increment and return the
value of the variable.

current implementation in linux/include/asm/atomic.h does not do this job.

any help would be greatly appreciated.

ashokr

from atomic.h

also if there is any reference to the gnu asm symtax, please send me a
pointer..
i can understand what the LOCK "incl %0 means.. but not sure what the rest
is for.

thanks
ashokr

static __inline__ void atomic_inc(atomic_t *v)
{
    __asm__ __volatile__(
        LOCK "incl %0"
        :"=m" (v->counter)
        :"m" (v->counter));
}

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Sat Jun 23 2001 - 21:00:22 EST