Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc
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
Commits
0965ae7d
Commit
0965ae7d
authored
Aug 28, 2008
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
vlc_join: check for deadlock
parent
1014a2aa
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
7 deletions
+7
-7
include/vlc_threads.h
include/vlc_threads.h
+1
-1
src/misc/threads.c
src/misc/threads.c
+6
-6
No files found.
include/vlc_threads.h
View file @
0965ae7d
...
@@ -179,7 +179,7 @@ VLC_EXPORT( void, __vlc_thread_join, ( vlc_object_t *, const char *, int ) );
...
@@ -179,7 +179,7 @@ VLC_EXPORT( void, __vlc_thread_join, ( vlc_object_t *, const char *, int ) );
VLC_EXPORT
(
int
,
vlc_clone
,
(
vlc_thread_t
*
,
void
*
(
*
)
(
void
*
),
void
*
,
int
)
);
VLC_EXPORT
(
int
,
vlc_clone
,
(
vlc_thread_t
*
,
void
*
(
*
)
(
void
*
),
void
*
,
int
)
);
VLC_EXPORT
(
void
,
vlc_cancel
,
(
vlc_thread_t
)
);
VLC_EXPORT
(
void
,
vlc_cancel
,
(
vlc_thread_t
)
);
VLC_EXPORT
(
int
,
vlc_join
,
(
vlc_thread_t
,
void
**
)
);
VLC_EXPORT
(
void
,
vlc_join
,
(
vlc_thread_t
,
void
**
)
);
VLC_EXPORT
(
void
,
vlc_control_cancel
,
(
int
cmd
,
...));
VLC_EXPORT
(
void
,
vlc_control_cancel
,
(
int
cmd
,
...));
#ifndef LIBVLC_USE_PTHREAD_CANCEL
#ifndef LIBVLC_USE_PTHREAD_CANCEL
...
...
src/misc/threads.c
View file @
0965ae7d
...
@@ -621,10 +621,12 @@ void vlc_cancel (vlc_thread_t thread_id)
...
@@ -621,10 +621,12 @@ void vlc_cancel (vlc_thread_t thread_id)
* @param p_result [OUT] pointer to write the thread return value or NULL
* @param p_result [OUT] pointer to write the thread return value or NULL
* @return 0 on success, a standard error code otherwise.
* @return 0 on success, a standard error code otherwise.
*/
*/
int
vlc_join
(
vlc_thread_t
handle
,
void
**
result
)
void
vlc_join
(
vlc_thread_t
handle
,
void
**
result
)
{
{
#if defined( LIBVLC_USE_PTHREAD )
#if defined( LIBVLC_USE_PTHREAD )
return
pthread_join
(
handle
,
result
);
int
val
=
pthread_join
(
handle
,
result
);
if
(
val
)
vlc_pthread_fatal
(
"joining thread"
,
val
,
__FILE__
,
__LINE__
);
#elif defined( UNDER_CE ) || defined( WIN32 )
#elif defined( UNDER_CE ) || defined( WIN32 )
do
do
...
@@ -636,15 +638,13 @@ int vlc_join (vlc_thread_t handle, void **result)
...
@@ -636,15 +638,13 @@ int vlc_join (vlc_thread_t handle, void **result)
if
(
result
)
if
(
result
)
*
result
=
handle
->
data
;
*
result
=
handle
->
data
;
free
(
handle
);
free
(
handle
);
return
0
;
#elif defined( HAVE_KERNEL_SCHEDULER_H )
#elif defined( HAVE_KERNEL_SCHEDULER_H )
int32_t
exit_value
;
int32_t
exit_value
;
ret
=
(
B_OK
==
wait_for_thread
(
p_priv
->
thread_id
,
&
exit_value
));
int
val
=
(
B_OK
==
wait_for_thread
(
p_priv
->
thread_id
,
&
exit_value
));
if
(
!
ret
&&
result
)
if
(
!
val
&&
result
)
*
result
=
(
void
*
)
exit_value
;
*
result
=
(
void
*
)
exit_value
;
return
ret
;
#endif
#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