public inbox for libc-alpha@sourceware.org
 help / color / mirror / Atom feed
From: Andreas Schwab <schwab@linux-m68k.org>
To: Florian Weimer via Libc-alpha <libc-alpha@sourceware.org>
Cc: Florian Weimer <fweimer@redhat.com>
Subject: Re: [PATCH 3/3] Misc: Add <sys/cstack.h> and the cstack_* family of functions
Date: Thu, 20 May 2021 14:50:37 +0200	[thread overview]
Message-ID: <87mtspy3fm.fsf@igel.home> (raw)
In-Reply-To: <f4c723ef74e5fcfd9e4816b0455b040b8558dba0.1621511874.git.fweimer@redhat.com> (Florian Weimer via Libc-alpha's message of "Thu, 20 May 2021 14:13:24 +0200")

On Mai 20 2021, Florian Weimer via Libc-alpha wrote:

> diff --git a/misc/cstack_allocate.c b/misc/cstack_allocate.c
> new file mode 100644
> index 0000000000..cbd9e6313c
> --- /dev/null
> +++ b/misc/cstack_allocate.c
> @@ -0,0 +1,125 @@
> +/* Allocating a call stack.
> +   Copyright (C) 2021 Free Software Foundation, Inc.
> +   This file is part of the GNU C Library.
> +
> +   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
> +   <https://www.gnu.org/licenses/>.  */
> +
> +#include <assert.h>
> +#include <errno.h>
> +#include <ldsodefs.h>
> +#include <stdlib.h>
> +#include <sys/cstack.h>
> +#include <sys/mman.h>
> +
> +#if __has_include (<sysconf-sigstksz.h>)
> +# include <sysconf-sigstksz.h>
> +#else
> +static long int
> +sysconf_sigstksz (void)
> +{
> +  return SIGSTKSZ;
> +}
> +#endif

How about putting that in sysdeps/generic/sysconf-sigstksz.h?

Andreas.

-- 
Andreas Schwab, schwab@linux-m68k.org
GPG Key fingerprint = 7578 EB47 D4E5 4D69 2510  2552 DF73 E780 A9DA AEC1
"And now for something completely different."

  parent reply	other threads:[~2021-05-20 12:50 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-05-20 12:11 [PATCH 0/3] Convenience function for allocating (alternate signal) stacks Florian Weimer
2021-05-20 12:13 ` [PATCH 1/3] elf: Initialize GLRO (dl_minsigstacksize) after static dlopen Florian Weimer
2021-05-20 14:40   ` H.J. Lu
2021-05-20 12:13 ` [PATCH 2/3] Hurd: Define ARCH_MIN_GUARD_SIZE in internal <pthread.h> Florian Weimer
2021-05-20 14:41   ` H.J. Lu
2021-05-20 12:13 ` [PATCH 3/3] Misc: Add <sys/cstack.h> and the cstack_* family of functions Florian Weimer
2021-05-20 12:21   ` Florian Weimer
2021-05-20 12:50   ` Andreas Schwab [this message]
2021-05-20 13:14     ` Florian Weimer
2021-05-24 14:58 Bruno Haible
2021-05-24 15:28 ` Bruno Haible
2021-05-25  7:42   ` Florian Weimer
2021-05-24 19:11 ` Adhemerval Zanella
2021-05-24 23:41   ` Paul Eggert
2021-05-25  7:40     ` Florian Weimer
2021-05-25 12:17       ` Adhemerval Zanella
2021-05-25 12:23         ` Florian Weimer
2021-05-25 12:25           ` Adhemerval Zanella
2021-05-25 12:29     ` Adhemerval Zanella
2021-05-25  8:41 ` Florian Weimer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87mtspy3fm.fsf@igel.home \
    --to=schwab@linux-m68k.org \
    --cc=fweimer@redhat.com \
    --cc=libc-alpha@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).