[vlc-commits] [Git][videolan/vlc][master] 2 commits: win32: thread: make QueueUserAPC available everywhere

Jean-Baptiste Kempf (@jbk) gitlab at videolan.org
Tue Apr 5 06:56:22 UTC 2022



Jean-Baptiste Kempf pushed to branch master at VideoLAN / VLC


Commits:
4dcc5694 by Steve Lhomme at 2022-04-05T06:44:02+00:00
win32: thread: make QueueUserAPC available everywhere

The documentation doesn't mention it's not available on older UWP targets.
The MS headers don't have that limitation either.

- - - - -
9f1a32a0 by Steve Lhomme at 2022-04-05T06:44:02+00:00
interrupt: make QueueUserAPC available everywhere on Windows

The documentation doesn't mention it's not available on older UWP targets.
The MS headers don't have that limitation either.

- - - - -


2 changed files:

- src/misc/interrupt.c
- src/win32/thread.c


Changes:

=====================================
src/misc/interrupt.c
=====================================
@@ -546,12 +546,8 @@ static void CALLBACK vlc_poll_i11e_wake_self(ULONG_PTR data)
 
 static void vlc_poll_i11e_wake(void *opaque)
 {
-#if !defined(VLC_WINSTORE_APP) || _WIN32_WINNT >= 0x0A00
     HANDLE th = opaque;
     QueueUserAPC(vlc_poll_i11e_wake_self, th, 0);
-#else
-    (void) opaque;
-#endif
 }
 
 static void vlc_poll_i11e_cleanup(void *opaque)


=====================================
src/win32/thread.c
=====================================
@@ -45,12 +45,6 @@
 /*** Static mutex and condition variable ***/
 static SRWLOCK super_lock = SRWLOCK_INIT;
 
-#ifndef VLC_WINSTORE_APP
-# define IS_INTERRUPTIBLE (1)
-#else
-# define IS_INTERRUPTIBLE (_WIN32_WINNT >= 0x0A00)
-#endif
-
 /*** Threads ***/
 static thread_local struct vlc_thread *current_thread_ctx = NULL;
 
@@ -423,22 +417,18 @@ int vlc_set_priority (vlc_thread_t th, int priority)
 
 /*** Thread cancellation ***/
 
-#if IS_INTERRUPTIBLE
 /* APC procedure for thread cancellation */
 static void CALLBACK vlc_cancel_self (ULONG_PTR self)
 {
     (void) self;
 }
-#endif
 
 void vlc_cancel (vlc_thread_t th)
 {
     atomic_store_explicit(&th->killed, true, memory_order_release);
     vlc_atomic_notify_one(&th->killed);
 
-#if IS_INTERRUPTIBLE
     QueueUserAPC (vlc_cancel_self, th->id, (uintptr_t)th);
-#endif
 }
 
 int vlc_savecancel (void)



View it on GitLab: https://code.videolan.org/videolan/vlc/-/compare/572b5887c4c8d523788348e96111cc225110cc40...9f1a32a0414a04c2ebd011b8c95a3df35456795b

-- 
View it on GitLab: https://code.videolan.org/videolan/vlc/-/compare/572b5887c4c8d523788348e96111cc225110cc40...9f1a32a0414a04c2ebd011b8c95a3df35456795b
You're receiving this email because of your account on code.videolan.org.


VideoLAN code repository instance


More information about the vlc-commits mailing list