Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Date: Sat, 22 Feb 2014 15:35:43 +0100
From: Jens Eichendorff <>
Subject: What does this code do?

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.


Powered by blists - more mailing lists

Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.