Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/videolan/dav1d.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/src/ref.h
diff options
context:
space:
mode:
authorHenrik Gramner <gramner@twoorioles.com>2022-04-28 16:58:13 +0300
committerHenrik Gramner <henrik@gramner.com>2022-04-28 17:17:08 +0300
commit601bfe21b7ad4397a8d12a3803f454b062279bc1 (patch)
treed8300a946bfbfc0f9177a2a48f1a555a9a62f386 /src/ref.h
parent6d0d066654d43d5eeffce958604c72d0c9cfbeed (diff)
Use a relaxed memory ordering in dav1d_ref_inc()
Increasing a reference counter only requires atomicity, but not ordering or synchronization.
Diffstat (limited to 'src/ref.h')
-rw-r--r--src/ref.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/ref.h b/src/ref.h
index f6e3028..ec070a0 100644
--- a/src/ref.h
+++ b/src/ref.h
@@ -54,7 +54,7 @@ void dav1d_ref_dec(Dav1dRef **ref);
int dav1d_ref_is_writable(Dav1dRef *ref);
static inline void dav1d_ref_inc(Dav1dRef *const ref) {
- atomic_fetch_add(&ref->ref_cnt, 1);
+ atomic_fetch_add_explicit(&ref->ref_cnt, 1, memory_order_relaxed);
}
#endif /* DAV1D_SRC_REF_H */