Subversion Repositories HelenOS-historic

Compare Revisions

Ignore whitespace Rev 1266 → Rev 1267

/kernel/trunk/arch/ppc32/include/atomic.h
33,7 → 33,7
{
long tmp;
 
asm __volatile__ (
asm volatile (
"1:\n"
"lwarx %0, 0, %2\n"
"addic %0, %0, 1\n"
41,7 → 41,8
"bne- 1b"
: "=&r" (tmp), "=m" (val->count)
: "r" (&val->count), "m" (val->count)
: "cc");
: "cc"
);
}
 
static inline void atomic_dec(atomic_t *val)
48,7 → 49,7
{
long tmp;
 
asm __volatile__(
asm volatile (
"1:\n"
"lwarx %0, 0, %2\n"
"addic %0, %0, -1\n"
56,7 → 57,8
"bne- 1b"
: "=&r" (tmp), "=m" (val->count)
: "r" (&val->count), "m" (val->count)
: "cc");
: "cc"
);
}
 
static inline long atomic_postinc(atomic_t *val)