atomic_cmpxchg
if (atomic_cmpxchg(&ic->i_credits, oldval, newval) != oldval)
return (atomic_cmpxchg(&conn->c_state, old, new) == old);