diff options
author | Ryo Nakamura <upa@haeena.net> | 2022-10-22 18:23:42 +0900 |
---|---|---|
committer | Ryo Nakamura <upa@haeena.net> | 2022-10-22 18:23:42 +0900 |
commit | b2ae183c8152f522a5cb4f9fb35942202846b5fe (patch) | |
tree | 677429dec71940ed067fbf8cff636985cd711314 /src/atomic.h | |
parent | ab0bf7e5dc5f11ef8b108d0b5d65a6013e7fb2f4 (diff) |
implement copy chunk
Diffstat (limited to 'src/atomic.h')
-rw-r--r-- | src/atomic.h | 4 |
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); } |