core/x86/arch_exports.h
/* returns true if var was equal to compare, and now is equal to exchange, 
   otherwise returns false
 */
returns true if var was equal to compare, and now is equal to exchange,
otherwise returns false
returns true if var was equal to compare and now is equal to exchange otherwise returns false
static inline bool atomic_compare_exchange_int(volatile int *var,
                                               int compare, int exchange)
{
    unsigned char c;
    ATOMIC_COMPARE_EXCHANGE(*var, compare, exchange);
    SET_IF_NOT_ZERO(c);
    return c == 0;
}
static inline bool atomic_compare_exchange_int ( volatile int * var , int compare , int exchange ) { unsigned char c ; ATOMIC_COMPARE_EXCHANGE ( * var , compare , exchange ) ; SET_IF_NOT_ZERO ( c ) ; return c == 0 ; }
returns true if var was equal to compare, and now is equal to exchange,
otherwise returns false
returns true if var was equal to compare and now is equal to exchange otherwise returns false
/* ZF is set if matched, all other flags are as if a normal compare happened */ /* we convert ZF value back to C */ /* FIXME: we add an extra memory reference to a local, 
       although we could put the return value in EAX ourselves */