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
bce03d65
Commit
bce03d65
authored
Aug 12, 2009
by
Pierre Ynard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
threads: simplify
Remove repeated code
parent
4ef45be2
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
8 deletions
+3
-8
src/misc/threads.c
src/misc/threads.c
+3
-8
No files found.
src/misc/threads.c
View file @
bce03d65
...
@@ -166,10 +166,7 @@ void __vlc_thread_join( vlc_object_t *p_this )
...
@@ -166,10 +166,7 @@ void __vlc_thread_join( vlc_object_t *p_this )
{
{
vlc_object_internals_t
*
p_priv
=
vlc_internals
(
p_this
);
vlc_object_internals_t
*
p_priv
=
vlc_internals
(
p_this
);
#if defined( LIBVLC_USE_PTHREAD )
#if defined( WIN32 ) && !defined( UNDER_CE )
vlc_join
(
p_priv
->
thread_id
,
NULL
);
#elif defined( WIN32 ) && !defined( UNDER_CE )
HANDLE
hThread
;
HANDLE
hThread
;
FILETIME
create_ft
,
exit_ft
,
kernel_ft
,
user_ft
;
FILETIME
create_ft
,
exit_ft
,
kernel_ft
,
user_ft
;
int64_t
real_time
,
kernel_time
,
user_time
;
int64_t
real_time
,
kernel_time
,
user_time
;
...
@@ -185,9 +182,11 @@ void __vlc_thread_join( vlc_object_t *p_this )
...
@@ -185,9 +182,11 @@ void __vlc_thread_join( vlc_object_t *p_this )
p_priv
->
b_thread
=
false
;
p_priv
->
b_thread
=
false
;
return
;
/* We have a problem! */
return
;
/* We have a problem! */
}
}
#endif
vlc_join
(
p_priv
->
thread_id
,
NULL
);
vlc_join
(
p_priv
->
thread_id
,
NULL
);
#if defined( WIN32 ) && !defined( UNDER_CE )
/* FIXME: this could work on WinCE too... except that it seems always to
/* FIXME: this could work on WinCE too... except that it seems always to
* return 0 for exit_ft and kernel_ft */
* return 0 for exit_ft and kernel_ft */
if
(
GetThreadTimes
(
hThread
,
&
create_ft
,
&
exit_ft
,
&
kernel_ft
,
&
user_ft
)
)
if
(
GetThreadTimes
(
hThread
,
&
create_ft
,
&
exit_ft
,
&
kernel_ft
,
&
user_ft
)
)
...
@@ -215,10 +214,6 @@ void __vlc_thread_join( vlc_object_t *p_this )
...
@@ -215,10 +214,6 @@ void __vlc_thread_join( vlc_object_t *p_this )
(
double
)((
user_time
%
(
60
*
1000000
))
/
1000000
.
0
)
);
(
double
)((
user_time
%
(
60
*
1000000
))
/
1000000
.
0
)
);
}
}
CloseHandle
(
hThread
);
CloseHandle
(
hThread
);
#else
vlc_join
(
p_priv
->
thread_id
,
NULL
);
#endif
#endif
p_priv
->
b_thread
=
false
;
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