[vlc-devel] [PATCH 2/2] os2: thread: remove unused detached thread support

Steve Lhomme robux4 at ycbcr.xyz
Mon Nov 9 15:10:08 CET 2020


Following a10ac09d42601cdf0671a58f5f971e7665e7e8d6
---
 src/os2/thread.c | 16 ++--------------
 1 file changed, 2 insertions(+), 14 deletions(-)

diff --git a/src/os2/thread.c b/src/os2/thread.c
index c5557f12be7..3aff3348efa 100644
--- a/src/os2/thread.c
+++ b/src/os2/thread.c
@@ -60,7 +60,6 @@ struct vlc_thread
     HEV            done_event;
     int            cancel_sock;
 
-    bool           detached;
     bool           killable;
     bool           killed;
     vlc_cleanup_t *cleaners;
@@ -262,16 +261,6 @@ retry:
         }
     }
     vlc_mutex_unlock (&super_mutex);
-
-    if (th->detached)
-    {
-        DosCloseEventSem (th->cancel_event);
-        DosCloseEventSem (th->done_event );
-
-        soclose (th->cancel_sock);
-
-        free (th);
-    }
 }
 
 static void vlc_entry( void *p )
@@ -285,7 +274,7 @@ static void vlc_entry( void *p )
     vlc_thread_cleanup (th);
 }
 
-static int vlc_clone_attr (vlc_thread_t *p_handle, bool detached,
+static int vlc_clone_attr (vlc_thread_t *p_handle,
                            void *(*entry) (void *), void *data, int priority)
 {
     struct vlc_thread *th = malloc (sizeof (*th));
@@ -293,7 +282,6 @@ static int vlc_clone_attr (vlc_thread_t *p_handle, bool detached,
         return ENOMEM;
     th->entry = entry;
     th->data = data;
-    th->detached = detached;
     th->killable = false; /* not until vlc_entry() ! */
     th->killed = false;
     th->cleaners = NULL;
@@ -334,7 +322,7 @@ error:
 int vlc_clone (vlc_thread_t *p_handle, void *(*entry) (void *),
                 void *data, int priority)
 {
-    return vlc_clone_attr (p_handle, false, entry, data, priority);
+    return vlc_clone_attr (p_handle, entry, data, priority);
 }
 
 void vlc_join (vlc_thread_t th, void **result)
-- 
2.26.2



More information about the vlc-devel mailing list