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
2ebdd8c3
Commit
2ebdd8c3
authored
Nov 23, 2010
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Win32: simplify vlc_cancel()
parent
53a25c48
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
6 deletions
+4
-6
src/win32/thread.c
src/win32/thread.c
+4
-6
No files found.
src/win32/thread.c
View file @
2ebdd8c3
...
...
@@ -79,7 +79,7 @@ static DWORD vlc_cancelable_wait (DWORD count, const HANDLE *handles,
delay
);
if
(
result
==
WAIT_OBJECT_0
+
count
)
{
vlc_cancel_self
(
NULL
);
vlc_cancel_self
(
(
uintptr_t
)
th
);
return
WAIT_IO_COMPLETION
;
}
else
...
...
@@ -645,20 +645,18 @@ int vlc_clone_detach (vlc_thread_t *p_handle, void *(*entry) (void *),
/*** Thread cancellation ***/
/* APC procedure for thread cancellation */
static
void
CALLBACK
vlc_cancel_self
(
ULONG_PTR
dummy
)
static
void
CALLBACK
vlc_cancel_self
(
ULONG_PTR
self
)
{
struct
vlc_thread
*
th
=
vlc_threadvar_get
(
thread_key
)
;
struct
vlc_thread
*
th
=
(
void
*
)
self
;
if
(
likely
(
th
!=
NULL
))
th
->
killed
=
true
;
(
void
)
dummy
;
}
void
vlc_cancel
(
vlc_thread_t
th
)
{
#ifndef UNDER_CE
QueueUserAPC
(
vlc_cancel_self
,
th
->
id
,
0
);
QueueUserAPC
(
vlc_cancel_self
,
th
->
id
,
(
uintptr_t
)
th
);
#else
SetEvent
(
th
->
cancel_event
);
#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