public inbox for libc-help@sourceware.org
 help / color / mirror / Atom feed
From: Adhemerval Zanella <adhemerval.zanella@linaro.org>
To: Libc-help <libc-help@sourceware.org>
Subject: Re: Where are SHMMIN and SHMMAX of shmget(2) defined?
Date: Mon, 12 Apr 2021 15:28:04 -0300	[thread overview]
Message-ID: <de058d75-98b5-325d-806e-11404a983164@linaro.org> (raw)
In-Reply-To: <CABrM6wkcqnEuASbuC3SoQQyFtv-fqBS=+-vYs8pgnuJyUkyKuQ@mail.gmail.com>



On 12/04/2021 14:27, Peng Yu via Libc-help wrote:
> Hi,
> 
> shmget(2) mentions SHMMIN and SHMMAX.
> 
> But I don't see where they are defined and what their values are. Does
> anybody know where they are defined?
> 
> gcc -E -dD - <<< '#include <sys/shm.h>' | grep 'SHMMAX\|SHMMIN'
> 

They are provided by the kernel headers since it is system specific
and glibc does not define them as extensions:

| $ gcc -E -dD - <<< '#include <linux/shm.h>' | grep 'SHMMAX\|SHMMIN'
| #define SHMMIN 1
| #define SHMMAX (ULONG_MAX - (1UL << 24))

      reply	other threads:[~2021-04-12 18:28 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-04-12 17:27 Peng Yu
2021-04-12 18:28 ` Adhemerval Zanella [this message]

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=de058d75-98b5-325d-806e-11404a983164@linaro.org \
    --to=adhemerval.zanella@linaro.org \
    --cc=libc-help@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).