Skip to content
Snippets Groups Projects
Commit 5a6b9d32 authored by Hugo Beauzée-Luyssen's avatar Hugo Beauzée-Luyssen
Browse files

vlc_atomic: Add a vlc_atomic_rc_get function

parent dd2dbe3a
No related branches found
No related tags found
No related merge requests found
......@@ -60,4 +60,12 @@ static inline bool vlc_atomic_rc_dec(vlc_atomic_rc_t *rc)
return prev == 1;
}
/** Returns the current reference count.
* This is not safe to use for logic and must only be used for debugging or
* assertion purposes */
static inline uintptr_t vlc_atomic_rc_get(const vlc_atomic_rc_t* rc)
{
return atomic_load_explicit(&rc->refs, memory_order_relaxed);
}
#endif
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment