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
1bd36deb
Commit
1bd36deb
authored
Oct 12, 2008
by
Geoffroy Couprie
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
WinCE: can't duplicate a thread handle
parent
558c6216
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
4 deletions
+8
-4
src/misc/threads.c
src/misc/threads.c
+8
-4
No files found.
src/misc/threads.c
View file @
1bd36deb
...
@@ -392,7 +392,6 @@ void vlc_cond_broadcast (vlc_cond_t *p_condvar)
...
@@ -392,7 +392,6 @@ void vlc_cond_broadcast (vlc_cond_t *p_condvar)
}
}
#ifdef UNDER_CE
#ifdef UNDER_CE
# warning FIXME
# define WaitForMultipleObjectsEx(a,b,c) WaitForMultipleObjects(a,b)
# define WaitForMultipleObjectsEx(a,b,c) WaitForMultipleObjects(a,b)
#endif
#endif
...
@@ -510,8 +509,6 @@ int vlc_threadvar_create( vlc_threadvar_t *p_tls, void (*destr) (void *) )
...
@@ -510,8 +509,6 @@ int vlc_threadvar_create( vlc_threadvar_t *p_tls, void (*destr) (void *) )
#if defined( LIBVLC_USE_PTHREAD )
#if defined( LIBVLC_USE_PTHREAD )
i_ret
=
pthread_key_create
(
p_tls
,
destr
);
i_ret
=
pthread_key_create
(
p_tls
,
destr
);
#elif defined( UNDER_CE )
i_ret
=
ENOSYS
;
#elif defined( WIN32 )
#elif defined( WIN32 )
/* FIXME: remember/use the destr() callback and stop leaking whatever */
/* FIXME: remember/use the destr() callback and stop leaking whatever */
*
p_tls
=
TlsAlloc
();
*
p_tls
=
TlsAlloc
();
...
@@ -526,7 +523,6 @@ void vlc_threadvar_delete (vlc_threadvar_t *p_tls)
...
@@ -526,7 +523,6 @@ void vlc_threadvar_delete (vlc_threadvar_t *p_tls)
{
{
#if defined( LIBVLC_USE_PTHREAD )
#if defined( LIBVLC_USE_PTHREAD )
pthread_key_delete
(
*
p_tls
);
pthread_key_delete
(
*
p_tls
);
#elif defined( UNDER_CE )
#elif defined( WIN32 )
#elif defined( WIN32 )
TlsFree
(
*
p_tls
);
TlsFree
(
*
p_tls
);
#else
#else
...
@@ -645,6 +641,7 @@ int vlc_clone (vlc_thread_t *p_handle, void * (*entry) (void *), void *data,
...
@@ -645,6 +641,7 @@ int vlc_clone (vlc_thread_t *p_handle, void * (*entry) (void *), void *data,
if
(
hThread
)
if
(
hThread
)
{
{
#ifndef UNDER_CE
/* Thread closes the handle when exiting, duplicate it here
/* Thread closes the handle when exiting, duplicate it here
* to be on the safe side when joining. */
* to be on the safe side when joining. */
if
(
!
DuplicateHandle
(
GetCurrentProcess
(),
hThread
,
if
(
!
DuplicateHandle
(
GetCurrentProcess
(),
hThread
,
...
@@ -655,6 +652,9 @@ int vlc_clone (vlc_thread_t *p_handle, void * (*entry) (void *), void *data,
...
@@ -655,6 +652,9 @@ int vlc_clone (vlc_thread_t *p_handle, void * (*entry) (void *), void *data,
free
(
th
);
free
(
th
);
return
ENOMEM
;
return
ENOMEM
;
}
}
#else
th
->
handle
=
hThread
;
#endif
ResumeThread
(
hThread
);
ResumeThread
(
hThread
);
if
(
priority
)
if
(
priority
)
...
@@ -920,6 +920,7 @@ void __vlc_thread_join( vlc_object_t *p_this )
...
@@ -920,6 +920,7 @@ void __vlc_thread_join( vlc_object_t *p_this )
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
;
#ifndef UNDER_CE
if
(
!
DuplicateHandle
(
GetCurrentProcess
(),
if
(
!
DuplicateHandle
(
GetCurrentProcess
(),
p_priv
->
thread_id
->
handle
,
p_priv
->
thread_id
->
handle
,
GetCurrentProcess
(),
GetCurrentProcess
(),
...
@@ -931,6 +932,9 @@ void __vlc_thread_join( vlc_object_t *p_this )
...
@@ -931,6 +932,9 @@ 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! */
}
}
#else
hThread
=
p_priv
->
thread_id
->
handle
;
#endif
vlc_join
(
p_priv
->
thread_id
,
NULL
);
vlc_join
(
p_priv
->
thread_id
,
NULL
);
...
...
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