x86: Consolidate NPTL fork.
authorRoland McGrath <roland@hack.frob.com>
Wed, 14 May 2014 18:31:37 +0000 (11:31 -0700)
committerRoland McGrath <roland@hack.frob.com>
Wed, 14 May 2014 18:31:37 +0000 (11:31 -0700)
ChangeLog
nptl/sysdeps/unix/sysv/linux/fork.c
sysdeps/unix/sysv/linux/i386/fork.h [moved from nptl/sysdeps/unix/sysv/linux/i386/fork.c with 86% similarity]
sysdeps/unix/sysv/linux/x86_64/fork.h [moved from nptl/sysdeps/unix/sysv/linux/x86_64/fork.c with 69% similarity]

index 5e452bd..d73d5eb 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,11 @@
 2014-05-14  Roland McGrath  <roland@hack.frob.com>
 
+       * nptl/sysdeps/unix/sysv/linux/fork.c: Use <> for fork.h #include.
+       * nptl/sysdeps/unix/sysv/linux/x86_64/fork.c: File removed.
+       * sysdeps/unix/sysv/linux/x86_64/fork.h: New file.
+       * nptl/sysdeps/unix/sysv/linux/i386/fork.c: File removed.
+       * sysdeps/unix/sysv/linux/i386/fork.h: New file.
+
        * nptl/sysdeps/unix/sysv/linux/i386/not-cancel.h: Moved ...
        * sysdeps/unix/sysv/linux/not-cancel.h: ... here.
        * nptl/sysdeps/unix/sysv/linux/sparc/not-cancel.h: File removed.
index 961fc8a..722ffce 100644 (file)
 #include <sysdep.h>
 #include <libio/libioP.h>
 #include <tls.h>
-#include "fork.h"
 #include <hp-timing.h>
 #include <ldsodefs.h>
 #include <bits/stdio-lock.h>
 #include <atomic.h>
 #include <pthreadP.h>
+#include <fork.h>
 
 
 unsigned long int *__fork_generation_pointer;
similarity index 86%
rename from nptl/sysdeps/unix/sysv/linux/i386/fork.c
rename to sysdeps/unix/sysv/linux/i386/fork.h
index 79ee39e..2919ccf 100644 (file)
@@ -1,4 +1,5 @@
-/* Copyright (C) 2002-2014 Free Software Foundation, Inc.
+/* Internal definitions for thread-friendly fork implementation.  Linux/i386.
+   Copyright (C) 2002-2014 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Ulrich Drepper <drepper@redhat.com>, 2002.
 
    <http://www.gnu.org/licenses/>.  */
 
 #include <sched.h>
-#include <signal.h>
-#include <sysdep.h>
-#include <tls.h>
-
 
 #define ARCH_FORK() \
   INLINE_SYSCALL (clone, 5,                                                  \
                  CLONE_CHILD_SETTID | CLONE_CHILD_CLEARTID | SIGCHLD, 0,     \
                  NULL, NULL, &THREAD_SELF->tid)
 
-#include "../fork.c"
+#include_next <fork.h>
similarity index 69%
rename from nptl/sysdeps/unix/sysv/linux/x86_64/fork.c
rename to sysdeps/unix/sysv/linux/x86_64/fork.h
index a036b92..1bd5301 100644 (file)
@@ -1,4 +1,5 @@
-/* Copyright (C) 2003-2014 Free Software Foundation, Inc.
+/* Internal definitions for thread-friendly fork implementation.  Linux/x86_64.
+   Copyright (C) 2003-2014 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Ulrich Drepper <drepper@redhat.com>, 2003.
 
    <http://www.gnu.org/licenses/>.  */
 
 #include <sched.h>
-#include <signal.h>
-#include <sysdep.h>
-#include <tls.h>
-
 
 #define ARCH_FORK() \
-  INLINE_SYSCALL (clone, 4,                                                  \
-                 CLONE_CHILD_SETTID | CLONE_CHILD_CLEARTID | SIGCHLD, 0,     \
-                 NULL, &THREAD_SELF->tid)
+  INLINE_SYSCALL (clone, 4,                                                   \
+                  CLONE_CHILD_SETTID | CLONE_CHILD_CLEARTID | SIGCHLD, 0,     \
+                  NULL, &THREAD_SELF->tid)
 
-#include "../fork.c"
+#include_next <fork.h>