aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoland McGrath <roland@hack.frob.com>2014-05-14 11:31:37 -0700
committerRoland McGrath <roland@hack.frob.com>2014-05-14 11:31:37 -0700
commitec136444ca77f7a64e2c3616fc560b6410a767d2 (patch)
treec93f4ef9a176de7e9b7a102f3ab096769dabc94e
parent2fbdf5339aaeaa423bd661524f7ec7af41fa2606 (diff)
downloadglibc-ec136444ca77f7a64e2c3616fc560b6410a767d2.tar
glibc-ec136444ca77f7a64e2c3616fc560b6410a767d2.tar.gz
glibc-ec136444ca77f7a64e2c3616fc560b6410a767d2.tar.bz2
glibc-ec136444ca77f7a64e2c3616fc560b6410a767d2.zip
x86: Consolidate NPTL fork.
-rw-r--r--ChangeLog6
-rw-r--r--nptl/sysdeps/unix/sysv/linux/fork.c2
-rw-r--r--sysdeps/unix/sysv/linux/i386/fork.h (renamed from nptl/sysdeps/unix/sysv/linux/i386/fork.c)9
-rw-r--r--sysdeps/unix/sysv/linux/x86_64/fork.h (renamed from nptl/sysdeps/unix/sysv/linux/x86_64/fork.c)15
4 files changed, 16 insertions, 16 deletions
diff --git a/ChangeLog b/ChangeLog
index 5e452bd1ec..d73d5eb4eb 100644
--- 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.
diff --git a/nptl/sysdeps/unix/sysv/linux/fork.c b/nptl/sysdeps/unix/sysv/linux/fork.c
index 961fc8a5ea..722ffce250 100644
--- a/nptl/sysdeps/unix/sysv/linux/fork.c
+++ b/nptl/sysdeps/unix/sysv/linux/fork.c
@@ -23,12 +23,12 @@
#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;
diff --git a/nptl/sysdeps/unix/sysv/linux/i386/fork.c b/sysdeps/unix/sysv/linux/i386/fork.h
index 79ee39e1ee..2919ccfcb3 100644
--- a/nptl/sysdeps/unix/sysv/linux/i386/fork.c
+++ b/sysdeps/unix/sysv/linux/i386/fork.h
@@ -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.
@@ -17,14 +18,10 @@
<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>
diff --git a/nptl/sysdeps/unix/sysv/linux/x86_64/fork.c b/sysdeps/unix/sysv/linux/x86_64/fork.h
index a036b923ff..1bd5301ebd 100644
--- a/nptl/sysdeps/unix/sysv/linux/x86_64/fork.c
+++ b/sysdeps/unix/sysv/linux/x86_64/fork.h
@@ -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.
@@ -17,14 +18,10 @@
<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>