silc_atomic_cas8

SYNOPSIS

    static inline
    SilcBool silc_atomic_cas8(SilcAtomic8 *atomic, SilcUInt8 old_val,
                              SilcUInt8 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.