Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Sat, 24 Jun 2017 10:00:06 +0200
From: Jens Gustedt <jens.gustedt@...ia.fr>
To: Rich Felker <dalias@...c.org>
Cc: musl@...ts.openwall.com
Subject: Re: [PATCH 4/8] determine the existence of private futexes
 at the first thread creation

Hello Rich,

On Fri, 23 Jun 2017 20:53:48 -0400 Rich Felker <dalias@...c.org> wrote:

> On Sat, Jun 24, 2017 at 01:42:20AM +0200, Jens Gustedt wrote:
> > What would you think of a patch that just cleans up the 128 vs
> > FUTEX_PRIVATE issue? Just to improve readability?  
> 
> That seems like a good thing. Regarding the mutex flag, I thought some
> places we depended on the 128 shared mutex flag being the inverse of
> the FUTEX_PRIVATE flag (so ^128 translates between them); if this is
> the case, do you have an elegant way to make it work?

The usages I found (I suppose this is all in src/thread/) only have
^128 to produce a "Boolean" int "priv" that is passed to __wake and
alike. There we always have something like

if (priv) priv = FUTEX_PRIVATE; (or 128)

In the case of __wake, which is inlined, the compiler might be able to
shortcut that conditional branch, but that should be independent from
using the macro or the literal.

> > Also there is this missing volatile in __get_locale.  
> 
> Nice catch.

I'll prepare patches for both issues.

Thanks
Jens

-- 
:: INRIA Nancy Grand Est ::: Camus ::::::: ICube/ICPS :::
:: ::::::::::::::: office Strasbourg : +33 368854536   ::
:: :::::::::::::::::::::: gsm France : +33 651400183   ::
:: ::::::::::::::: gsm international : +49 15737185122 ::
:: http://icube-icps.unistra.fr/index.php/Jens_Gustedt ::

Content of type "application/pgp-signature" skipped

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.