Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
Tested-by: Dieter Nützel <Dieter@nuetzel-hh.de>
struct pipe_reference *src,
debug_reference_descriptor get_desc)
{
- boolean destroy = FALSE;
-
if (dst != src) {
/* bump the src.count first */
if (src) {
if (dst) {
int count = p_atomic_dec_return(&dst->count);
assert(count != -1); /* dst had to be referenced */
- if (!count)
- destroy = TRUE;
-
debug_reference(dst, get_desc, -1);
+ if (!count)
+ return true;
}
}
- return destroy;
+ return false;
}
static inline boolean