Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-1.1
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-1.1
Commits
5483afb5
Commit
5483afb5
authored
Apr 13, 2009
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
De-inline vlc_assert_locked()
parent
fb79b01e
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
2 deletions
+8
-2
src/libvlc.h
src/libvlc.h
+1
-2
src/misc/threads.c
src/misc/threads.c
+7
-0
No files found.
src/libvlc.h
View file @
5483afb5
...
...
@@ -63,8 +63,7 @@ void vlc_trace (const char *fn, const char *file, unsigned line);
#define vlc_backtrace() vlc_trace(__func__, __FILE__, __LINE__)
#if defined (LIBVLC_USE_PTHREAD) && !defined (NDEBUG)
# define vlc_assert_locked( m ) \
assert (pthread_mutex_lock (m) == EDEADLK)
void
vlc_assert_locked
(
vlc_mutex_t
*
);
#else
# define vlc_assert_locked( m ) (void)m
#endif
...
...
src/misc/threads.c
View file @
5483afb5
...
...
@@ -356,6 +356,13 @@ void vlc_mutex_destroy (vlc_mutex_t *p_mutex)
#endif
}
#if defined(LIBVLC_USE_PTHREAD) && !defined(NDEBUG)
void
vlc_assert_locked
(
vlc_mutex_t
*
p_mutex
)
{
assert
(
pthread_mutex_lock
(
p_mutex
)
==
EDEADLK
);
}
#endif
/**
* Acquires a mutex. If needed, waits for any other thread to release it.
* Beware of deadlocks when locking multiple mutexes at the same time,
...
...
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