]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
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 5e452bd1ec490b1ae4b5cab693e3eb768d3fda04..d73d5eb4ebc54f48263744609fbb8886c033b753 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 961fc8a5ea4ede0197471b6b723ef467f3f78ee1..722ffce25080354be1a983c624b8f25be37c336e 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 79ee39e1eeef764eb487ab000400eba036ffe2cc..2919ccfcb33adc991e33df96b99e59d66ba7bc83 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 a036b923ff2c349608351d0a18a6d2eaa80fb1e0..1bd5301ebd26964c34e7170213c0788e7f343c35 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>