This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH v3 15/19] RISC-V: Linux Syscall Interface
- From: Adhemerval Zanella <adhemerval dot zanella at linaro dot org>
- To: libc-alpha at sourceware dot org
- Date: Fri, 5 Jan 2018 12:04:13 -0200
- Subject: Re: [PATCH v3 15/19] RISC-V: Linux Syscall Interface
- Authentication-results: sourceware.org; auth=none
- References: <20171227060534.3998-1-palmer@dabbelt.com> <20171227060534.3998-16-palmer@dabbelt.com>
On 27/12/2017 04:05, Palmer Dabbelt wrote:
> --- /dev/null
> +++ b/sysdeps/unix/sysv/linux/riscv/arch-fork.h
> @@ -0,0 +1,27 @@
> +/* Internal definitions for thread-friendly fork implementation. Linux/i386.
> + Copyright (C) 2002-2017 Free Software Foundation, Inc.
> + This file is part of the GNU C Library.
> + Contributed by Ulrich Drepper <drepper@redhat.com>, 2002.
> +
> + The GNU C Library is free software; you can redistribute it and/or
> + modify it under the terms of the GNU Lesser General Public
> + License as published by the Free Software Foundation; either
> + version 2.1 of the License, or (at your option) any later version.
> +
> + The GNU C Library is distributed in the hope that it will be useful,
> + but WITHOUT ANY WARRANTY; without even the implied warranty of
> + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
> + Lesser General Public License for more details.
> +
> + You should have received a copy of the GNU Lesser General Public
> + License along with the GNU C Library; if not, see
> + <http://www.gnu.org/licenses/>. */
> +
> +#include <sched.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)
Why did you choose CONFIG_CLONE_BACKWARDS for riscv? My understanding
reading kernel/fork.c is default for newer ports should be the one
without any BACKWARDS* define, x86_64 for instance (and arch/Kconfig:824
seems to put CLONE_BACKWARDS on the 'ABI hall of shame' as well).