From: Jens Eichendorff <jexo@online.de>
To: musl@lists.openwall.com
Subject: What does this code do?
Date: Sat, 22 Feb 2014 15:35:43 +0100 [thread overview]
Message-ID: <20140222143536.GA5438@diogenes.samsung.router> (raw)
While skimming some parts of the musl libc I have come across the
following weird line in `src/thread/__wait.c':
if (priv) priv = 128; priv=0;
whereby `priv' is then bitwise OR-ed to the FUTEX_WAIT operation
constant to a futex syscall. Does this code exist to avoid
optimizations, do optimizations, or just add waiting time? What does it
do and what is the `priv' parameter of __wait() for? Excuse me if this
is a really stupid question, I'm not very familiar with somewhat
low-level code.
Looking through the git logs this is part of the initial import commit,
so I could not find any comments to why this was done.
MfG
Jens
next reply other threads:[~2014-02-22 14:35 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-02-22 14:35 Jens Eichendorff [this message]
2014-02-22 14:59 ` Rich Felker
2014-02-23 5:31 ` Rich Felker
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=20140222143536.GA5438@diogenes.samsung.router \
--to=jexo@online.de \
--cc=musl@lists.openwall.com \
/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.
Code repositories for project(s) associated with this public inbox
https://git.vuxu.org/mirror/musl/
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 NNTP newsgroup(s).