public inbox for libc-help@sourceware.org
 help / color / mirror / Atom feed
From: lihuiba <magazine.lihuiba@163.com>
To: libc-help@sourceware.org
Subject: a question about the implementation of errno
Date: Wed, 04 Jul 2018 05:07:00 -0000	[thread overview]
Message-ID: <19bfad75.513b.16463b06140.Coremail.magazine.lihuiba@163.com> (raw)

Hi all,


I noticed recently that errno is implemented as a macro that expands to (*__errno_location()).
I wonder why it is implemented as this, and why it is not a thread-local int variable.
I suppose thread-local int is faster than function all.


Thanks!




Huiba Li

             reply	other threads:[~2018-07-04  5:07 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-07-04  5:07 lihuiba [this message]
2018-07-04 10:35 ` Florian Weimer
2018-07-04 11:34   ` lihuiba

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=19bfad75.513b.16463b06140.Coremail.magazine.lihuiba@163.com \
    --to=magazine.lihuiba@163.com \
    --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).