svn commit: branches/uClibc-nptl/libpthread/nptl/sysdeps/unix/sysv/linux

kraj at uclibc.org kraj at uclibc.org
Thu Jul 10 02:02:20 UTC 2008


Author: kraj
Date: 2008-07-09 19:02:18 -0700 (Wed, 09 Jul 2008)
New Revision: 22735

Log:
Fix __USE_STDIO_FUTEXES__ fallout

Modified:
   branches/uClibc-nptl/libpthread/nptl/sysdeps/unix/sysv/linux/fork.c


Changeset:
Modified: branches/uClibc-nptl/libpthread/nptl/sysdeps/unix/sysv/linux/fork.c
===================================================================
--- branches/uClibc-nptl/libpthread/nptl/sysdeps/unix/sysv/linux/fork.c	2008-07-10 01:28:09 UTC (rev 22734)
+++ branches/uClibc-nptl/libpthread/nptl/sysdeps/unix/sysv/linux/fork.c	2008-07-10 02:02:18 UTC (rev 22735)
@@ -19,7 +19,7 @@
 
 #include <assert.h>
 #include <stdlib.h>
-#include <syscall.h>
+#include <stdio.h>
 #include <unistd.h>
 #include <sys/types.h>
 #include <sysdep.h>
@@ -58,7 +58,6 @@
 #endif
 }
 
-extern __typeof(fork) __libc_fork;
 pid_t __libc_fork (void)
 {
   pid_t pid;
@@ -120,7 +119,11 @@
       break;
     }
 
-  __UCLIBC_IO_MUTEX_LOCK(_stdio_openlist_add_lock);
+#ifdef __USE_STDIO_FUTEXES__
+    _IO_lock_lock (_stdio_openlist_add_lock);
+#else
+    __pthread_mutex_lock(&_stdio_openlist_add_lock);
+#endif
 
 #ifndef NDEBUG
   pid_t ppid = THREAD_GETMEM (THREAD_SELF, tid);
@@ -196,7 +199,11 @@
       THREAD_SETMEM (THREAD_SELF, pid, parentpid);
 
       /* We execute this even if the 'fork' call failed.  */
-      __UCLIBC_IO_MUTEX_UNLOCK(_stdio_openlist_add_lock);
+#ifdef __USE_STDIO_FUTEXES__
+      _IO_lock_unlock(_stdio_openlist_add_lock);
+#else
+      __pthread_mutex_unlock(&_stdio_openlist_add_lock);
+#endif
 
       /* Run the handlers registered for the parent.  */
       while (allp != NULL)




More information about the uClibc-cvs mailing list