summaryrefslogtreecommitdiff
path: root/src/atomic.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/atomic.h')
-rw-r--r--src/atomic.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/atomic.h b/src/atomic.h
index a840653..4f643e9 100644
--- a/src/atomic.h
+++ b/src/atomic.h
@@ -12,9 +12,9 @@ static inline void refcnt_inc(refcnt *cnt)
__sync_add_and_fetch(cnt, 1);
}
-static inline void refcnt_dec(refcnt *cnt)
+static inline refcnt refcnt_dec(refcnt *cnt)
{
- __sync_sub_and_fetch(cnt, 1);
+ return __sync_sub_and_fetch(cnt, 1);
}