win32: reorder the code
authorSteve Lhomme <robUx4@videolabs.io>
Mon, 23 May 2016 15:28:09 +0000 (17:28 +0200)
committerJean-Baptiste Kempf <jb@videolan.org>
Tue, 24 May 2016 21:57:31 +0000 (23:57 +0200)
Signed-off-by: Jean-Baptiste Kempf <jb@videolan.org>
src/win32/thread.c

index 34ad2d6..12cbed6 100644 (file)
@@ -45,6 +45,25 @@ static vlc_cond_t  super_variable;
 
 #define IS_INTERRUPTIBLE (!VLC_WINSTORE_APP || _WIN32_WINNT >= 0x0A00)
 
+/*** Threads ***/
+static DWORD thread_key;
+
+struct vlc_thread
+{
+    HANDLE         id;
+
+    bool           killable;
+#if IS_INTERRUPTIBLE
+    bool           killed;
+#else
+    atomic_bool    killed;
+#endif
+    vlc_cleanup_t *cleaners;
+
+    void        *(*entry) (void *);
+    void          *data;
+};
+
 /*** Common helpers ***/
 #if !IS_INTERRUPTIBLE
 static bool isCancelled(void);
@@ -425,25 +444,6 @@ retry:
     vlc_mutex_unlock(&super_mutex);
 }
 
-/*** Threads ***/
-static DWORD thread_key;
-
-struct vlc_thread
-{
-    HANDLE         id;
-
-    bool           killable;
-#if IS_INTERRUPTIBLE
-    bool           killed;
-#else
-    atomic_bool    killed;
-#endif
-    vlc_cleanup_t *cleaners;
-
-    void        *(*entry) (void *);
-    void          *data;
-};
-
 #if !IS_INTERRUPTIBLE
 static bool isCancelled(void)
 {