mailing list of musl libc
 help / color / mirror / code / Atom feed
* What does this code do?
@ 2014-02-22 14:35 Jens Eichendorff
  2014-02-22 14:59 ` Rich Felker
  0 siblings, 1 reply; 3+ messages in thread
From: Jens Eichendorff @ 2014-02-22 14:35 UTC (permalink / raw)
  To: musl

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


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2014-02-23  5:31 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-02-22 14:35 What does this code do? Jens Eichendorff
2014-02-22 14:59 ` Rich Felker
2014-02-23  5:31   ` Rich Felker

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).