[uClibc-cvs] uClibc/libpthread/linuxthreads pthread.c,1.4,1.5
Erik Andersen
andersen at codepoet.org
Thu Jan 23 07:57:06 UTC 2003
Update of /var/cvs/uClibc/libpthread/linuxthreads
In directory winder:/tmp/cvs-serv540/linuxthreads
Modified Files:
pthread.c
Log Message:
Per patch from Nathan Field at ghs.com, fix __pthread_initialize_manager so it
locks before calling clone when under a debugger, and unlocks on success or
failure of clone when under a debugger.
Index: pthread.c
===================================================================
RCS file: /var/cvs/uClibc/libpthread/linuxthreads/pthread.c,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -d -r1.4 -r1.5
--- pthread.c 19 Aug 2002 10:05:03 -0000 1.4
+++ pthread.c 23 Jan 2003 07:57:02 -0000 1.5
@@ -384,6 +384,9 @@
| __pthread_initial_thread.p_eventbuf.eventmask.event_bits[idx]))
!= 0)
{
+
+ __pthread_lock(__pthread_manager_thread.p_lock, NULL);
+
pid = clone(__pthread_manager_event,
(void **) __pthread_manager_thread_tos,
CLONE_VM | CLONE_FS | CLONE_FILES | CLONE_SIGHAND,
@@ -404,10 +407,9 @@
/* Now call the function which signals the event. */
__linuxthreads_create_event ();
-
- /* Now restart the thread. */
- __pthread_unlock(__pthread_manager_thread.p_lock);
}
+ /* Now restart the thread. */
+ __pthread_unlock(__pthread_manager_thread.p_lock);
}
}
More information about the uClibc-cvs
mailing list