Skip to content

util/u_atomic: fix return type of p_atomic_{inc,dec}_return() and p_atomic_{cmp,}xchg()

Eric Engestrom requested to merge eric/mesa:u_atomic-return-type into master

We're trying to cast the return type to the type of the var, but instead we were casting sizeof(*v).

Fixes: 6df72e97 ("util: Make u_atomic.h typeless.")
Fixes: 0a7f17cf ("util/u_atomic: add p_atomic_xchg")
/cc @mattst88 @nh

Edited by Eric Engestrom

Merge request reports