Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-gpu
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
videolan
vlc-gpu
Commits
1252a5eb
Commit
1252a5eb
authored
Aug 09, 2011
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add helpers to store floats into vlc_atomic_t
(Lets assume that uintptr_t is big enough, i.e. 32-bits).
parent
aa7fcdb1
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
0 deletions
+17
-0
include/vlc_atomic.h
include/vlc_atomic.h
+17
-0
No files found.
include/vlc_atomic.h
View file @
1252a5eb
...
...
@@ -53,4 +53,21 @@ static inline uintptr_t vlc_atomic_dec (vlc_atomic_t *atom)
VLC_API
uintptr_t
vlc_atomic_swap
(
vlc_atomic_t
*
,
uintptr_t
);
VLC_API
uintptr_t
vlc_atomic_compare_swap
(
vlc_atomic_t
*
,
uintptr_t
,
uintptr_t
);
/** Helper to retrieve a single precision from an atom. */
static
inline
float
vlc_atomic_getf
(
const
vlc_atomic_t
*
atom
)
{
union
{
float
f
;
uintptr_t
i
;
}
u
;
u
.
i
=
vlc_atomic_get
(
atom
);
return
u
.
f
;
}
/** Helper to store a single precision into an atom. */
static
inline
float
vlc_atomic_setf
(
vlc_atomic_t
*
atom
,
float
f
)
{
union
{
float
f
;
uintptr_t
i
;
}
u
;
u
.
f
=
f
;
vlc_atomic_set
(
atom
,
u
.
i
);
return
f
;
}
#endif
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment