static __inline__ int atomic_dec_and_test(atomic_t *v)
{
unsigned char c;
__asm__ __volatile__(
LOCK "decl %0; sete %1"
:"=m" (v->counter), "=qm" (c)
:"m" (v->counter) : "memory");
return c != 0;
}
this implementation puzzle me a lot the atomic means what in this function? only the decrease part? but how can we ensure the sete return the right value? we need to disable the interrupt in the function invoke this one?, seems the atomic is only for one sentence(decl) in this function, not the whole function?