From ec136444ca77f7a64e2c3616fc560b6410a767d2 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Wed, 14 May 2014 11:31:37 -0700 Subject: [PATCH] x86: Consolidate NPTL fork. --- ChangeLog | 6 ++++++ nptl/sysdeps/unix/sysv/linux/fork.c | 2 +- .../i386/fork.c => sysdeps/unix/sysv/linux/i386/fork.h | 9 +++------ .../fork.c => sysdeps/unix/sysv/linux/x86_64/fork.h | 15 ++++++--------- 4 files changed, 16 insertions(+), 16 deletions(-) rename nptl/sysdeps/unix/sysv/linux/i386/fork.c => sysdeps/unix/sysv/linux/i386/fork.h (86%) rename nptl/sysdeps/unix/sysv/linux/x86_64/fork.c => sysdeps/unix/sysv/linux/x86_64/fork.h (69%) diff --git a/ChangeLog b/ChangeLog index 5e452bd1ec..d73d5eb4eb 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,11 @@ 2014-05-14 Roland McGrath + * 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 #include #include -#include "fork.h" #include #include #include #include #include +#include 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 similarity index 86% rename from nptl/sysdeps/unix/sysv/linux/i386/fork.c rename to 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 , 2002. @@ -17,14 +18,10 @@ . */ #include -#include -#include -#include - #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 diff --git a/nptl/sysdeps/unix/sysv/linux/x86_64/fork.c b/sysdeps/unix/sysv/linux/x86_64/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 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 , 2003. @@ -17,14 +18,10 @@ . */ #include -#include -#include -#include - #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 -- 2.11.4.GIT