Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
VLC
Manage
Activity
Members
Labels
Plan
Issues
4k
Issue boards
Milestones
Code
Merge requests
450
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Analyze
Contributor analytics
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
VideoLAN
VLC
Commits
5a6b9d32
Commit
5a6b9d32
authored
4 years ago
by
Hugo Beauzée-Luyssen
Browse files
Options
Downloads
Patches
Plain Diff
vlc_atomic: Add a vlc_atomic_rc_get function
parent
dd2dbe3a
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
include/vlc_atomic.h
+8
-0
8 additions, 0 deletions
include/vlc_atomic.h
with
8 additions
and
0 deletions
include/vlc_atomic.h
+
8
−
0
View file @
5a6b9d32
...
...
@@ -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
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment