Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
F
ffmpeg
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
submodule
ffmpeg
Commits
c53e796f
Commit
c53e796f
authored
Oct 07, 2015
by
Luca Barbato
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
thread: Provide no-op variants for pthread_once
parent
08377f9c
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
0 deletions
+17
-0
thread.h
libavutil/thread.h
+17
-0
No files found.
libavutil/thread.h
View file @
c53e796f
...
...
@@ -39,6 +39,11 @@
#define ff_mutex_unlock pthread_mutex_unlock
#define ff_mutex_destroy pthread_mutex_destroy
#define AVOnce pthread_once_t
#define AV_ONCE_INIT PTHREAD_ONCE_INIT
#define ff_thread_once(control, routine) pthread_once(control, routine)
#else
#define AVMutex char
...
...
@@ -48,6 +53,18 @@
#define ff_mutex_unlock(mutex) (0)
#define ff_mutex_destroy(mutex) (0)
#define AVOnce char
#define AV_ONCE_INIT 0
static
inline
int
ff_thread_once
(
char
*
control
,
void
(
*
routine
)(
void
))
{
if
(
!*
control
)
{
routine
();
*
control
=
1
;
}
return
0
;
}
#endif
#endif
/* AVUTIL_THREAD_H */
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