[xiph-cvs] cvs commit: thread thread.c

Michael Smith msmith at xiph.org
Mon Apr 29 23:50:48 PDT 2002



msmith      02/04/29 23:50:48

  Modified:    .        thread.c
  Log:
  Don't use start after freeing it in thread startup code.

Revision  Changes    Path
1.9       +2 -1      thread/thread.c

Index: thread.c
===================================================================
RCS file: /usr/local/cvsroot/thread/thread.c,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -r1.8 -r1.9
--- thread.c	2002/03/05 23:59:38	1.8
+++ thread.c	2002/04/30 06:50:47	1.9
@@ -574,6 +574,7 @@
         void *(*start_routine)(void *) = start->start_routine;
         void *real_arg = start->arg;
         thread_t *thread = start->thread;
+    int detach = start->detached;
 
         _block_signals();
 
@@ -587,7 +588,7 @@
 
         LOG_INFO4("Added thread %d [%s] started at [%s:%d]", thread->thread_id, thread->name, thread->file, thread->line);
 
-	if (start->detached) {
+	if (detach) {
                 pthread_detach(thread->sys_thread);
         }
         pthread_setcancelstate(PTHREAD_CANCEL_ENABLE, NULL);

<p><p><p>--- >8 ----
List archives:  http://www.xiph.org/archives/
Ogg project homepage: http://www.xiph.org/ogg/
To unsubscribe from this list, send a message to 'cvs-request at xiph.org'
containing only the word 'unsubscribe' in the body.  No subject is needed.
Unsubscribe messages sent to the list will be ignored/filtered.



More information about the commits mailing list