Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-gpu
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-gpu
Commits
272308b2
Commit
272308b2
authored
Oct 06, 2008
by
Geoffroy Couprie
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
WinCE: do an ugly thread cancellation without using QueueUserAPC
parent
01f7daf5
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
18 additions
and
1 deletion
+18
-1
src/misc/mtime.c
src/misc/mtime.c
+1
-1
src/misc/threads.c
src/misc/threads.c
+17
-0
No files found.
src/misc/mtime.c
View file @
272308b2
...
...
@@ -53,7 +53,7 @@
#endif
#if defined( UNDER_CE )
#
include <windows.h>
#
define SleepEx(a,b) Sleep(a)
#endif
#if defined(HAVE_SYS_TIME_H)
...
...
src/misc/threads.c
View file @
272308b2
...
...
@@ -49,6 +49,10 @@ static vlc_threadvar_t cancel_key;
# include <execinfo.h>
#endif
#ifdef UNDER_CE
# define WaitForSingleObjectEx(a,b,c) WaitForSingleObject(a,b)
#endif
/**
* Print a backtrace to the standard error for debugging purpose.
*/
...
...
@@ -689,6 +693,19 @@ void vlc_cancel (vlc_thread_t thread_id)
{
#if defined (LIBVLC_USE_PTHREAD_CANCEL)
pthread_cancel
(
thread_id
);
#elif defined (UNDER_CE)
/* HACK:There is no way to use something
* like QueueUserAPC on Windows CE, so I rely
* on some crappy arch specific code */
CONTEXT
context
;
context
.
ContextFlags
=
CONTEXT_CONTROL
;
GetThreadContext
(
thread_id
->
handle
,
&
context
);
/* Setting the instruction pointer for the canceled thread */
#if defined(_ARM_) || defined(ARM)
context
.
Pc
=
(
DWORD_PTR
)
vlc_cancel_self
;
#endif
SetThreadContext
(
thread_id
->
handle
,
&
context
);
#elif defined (WIN32)
QueueUserAPC
(
vlc_cancel_self
,
thread_id
->
handle
,
0
);
#else
...
...
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