Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-2-2
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-2-2
Commits
3f202d2e
Commit
3f202d2e
authored
Aug 12, 2008
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Decrease thread count after join rather than before exit
parent
165d87fe
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
9 deletions
+11
-9
src/misc/threads.c
src/misc/threads.c
+11
-9
No files found.
src/misc/threads.c
View file @
3f202d2e
...
...
@@ -465,15 +465,6 @@ static THREAD_RTYPE thread_entry (void *data)
func
(
obj
);
msg_Dbg
(
obj
,
"thread ended"
);
libvlc_priv_t
*
libpriv
=
libvlc_priv
(
obj
->
p_libvlc
);
vlc_mutex_lock
(
&
libpriv
->
threads_lock
);
#ifndef NDEBUG
libpriv
->
threads_count
--
;
#else
if
(
--
libpriv
->
threads_count
==
0
)
#endif
vlc_cond_signal
(
&
libpriv
->
threads_wait
);
vlc_mutex_unlock
(
&
libpriv
->
threads_lock
);
return
THREAD_RVAL
;
}
...
...
@@ -775,8 +766,19 @@ error:
(
unsigned
long
)
p_priv
->
thread_id
,
psz_file
,
i_line
);
}
else
{
libvlc_priv_t
*
libpriv
=
libvlc_priv
(
p_this
->
p_libvlc
);
msg_Dbg
(
p_this
,
"thread %lu joined (%s:%d)"
,
(
unsigned
long
)
p_priv
->
thread_id
,
psz_file
,
i_line
);
vlc_mutex_lock
(
&
libpriv
->
threads_lock
);
#ifndef NDEBUG
libpriv
->
threads_count
--
;
#else
if
(
--
libpriv
->
threads_count
==
0
)
#endif
vlc_cond_signal
(
&
libpriv
->
threads_wait
);
vlc_mutex_unlock
(
&
libpriv
->
threads_lock
);
}
p_priv
->
b_thread
=
false
;
}
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