silc_atomic_cas32

SYNOPSIS

    static inline
    SilcBool silc_atomic_cas32(SilcAtomic32 *atomic, SilcUInt32 old_val,
                               SilcUInt32 new_val)

DESCRIPTION

Performs compare and swap (CAS). Atomically compares if the variable `atomic' has the value `old_val' and in that case swaps it with the value `new_val'. Returns TRUE if the old value was same and it was swapped and FALSE if it differed and was not swapped.