[vlc-commits] os2: thread: remove unused detached thread support

Steve Lhomme git at videolan.org
Mon Nov 9 15:27:56 CET 2020


vlc | branch: master | Steve Lhomme <robux4 at ycbcr.xyz> | Mon Nov  9 13:06:29 2020 +0100| [f09937dc6dbfe56989d532ad5e5be3c6fd9a182a] | committer: Steve Lhomme

os2: thread: remove unused detached thread support

Following a10ac09d42601cdf0671a58f5f971e7665e7e8d6

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=f09937dc6dbfe56989d532ad5e5be3c6fd9a182a
---

 src/os2/thread.c | 22 ++--------------------
 1 file changed, 2 insertions(+), 20 deletions(-)

diff --git a/src/os2/thread.c b/src/os2/thread.c
index c5557f12be..822b3f3b26 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,15 +274,14 @@ static void vlc_entry( void *p )
     vlc_thread_cleanup (th);
 }
 
-static int vlc_clone_attr (vlc_thread_t *p_handle, bool detached,
-                           void *(*entry) (void *), void *data, int priority)
+int vlc_clone (vlc_thread_t *p_handle, void *(*entry) (void *),
+               void *data, int priority)
 {
     struct vlc_thread *th = malloc (sizeof (*th));
     if (unlikely(th == NULL))
         return ENOMEM;
     th->entry = entry;
     th->data = data;
-    th->detached = detached;
     th->killable = false; /* not until vlc_entry() ! */
     th->killed = false;
     th->cleaners = NULL;
@@ -331,12 +319,6 @@ error:
     return ENOMEM;
 }
 
-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);
-}
-
 void vlc_join (vlc_thread_t th, void **result)
 {
     ULONG rc;



More information about the vlc-commits mailing list