From: Alexander Monakov <amonakov@ispras.ru>
To: Sebastian Kemper <sebastian_ml@gmx.net>
Cc: musl@lists.openwall.com, Szabolcs Nagy <nsz@port70.net>
Subject: Re: Robust shared mutexes?
Date: Sun, 27 Nov 2016 14:51:08 +0300 (MSK) [thread overview]
Message-ID: <alpine.LNX.2.20.13.1611271424270.2229@monopod.intra.ispras.ru> (raw)
In-Reply-To: <20161127105425.GA14788@hotdamn.lan>
On Sun, 27 Nov 2016, Sebastian Kemper wrote:
> I've posted the corresponding part from config.log below. It fails
> because musl doesn't define PTHREAD_MUTEX_ROBUST_NP (glibc does). And
> apr uses PTHREAD_MUTEX_ROBUST_NP. It means that I should set
> apr_cv_mutex_robust_shared=no when cross-compiling this apr, I suppose
> :)
>
> configure:25459: checking for robust cross-process mutex support
> configure:25500: gcc -o conftest -g -O2 -DLINUX -D_REENTRANT -D_GNU_SOURCE conftest.c -lpthread >&5
> conftest.c: In function 'main':
> conftest.c:197:47: error: 'PTHREAD_MUTEX_ROBUST_NP' undeclared (first use in this function)
> if (pthread_mutexattr_setrobust_np(&attr, PTHREAD_MUTEX_ROBUST_NP))
This configure check is very old and predates standartization of robust mutexes
in POSIX 2008: http://svn.apache.org/viewvc?view=revision&revision=382030
Consequently, APR uses _np interfaces for robust mutexes, so the their uses in
locks/unix/proc_mutex.c would need to be fixed together with this configure
check.
But I don't understand their use of robust mutexes, in that file
proc_mutex_proc_pthread_acquire just calls pthread_mutex_consistent_np without
any sort of callback or indicating it to the caller via the return value.
Alexander
next prev parent reply other threads:[~2016-11-27 11:51 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-11-26 21:49 Sebastian Kemper
2016-11-26 22:24 ` Rich Felker
2016-11-26 22:51 ` Sebastian Kemper
2016-11-26 22:56 ` Rich Felker
2016-11-26 23:01 ` Szabolcs Nagy
2016-11-27 10:54 ` Sebastian Kemper
2016-11-27 11:37 ` Szabolcs Nagy
2016-11-27 11:51 ` Alexander Monakov [this message]
2016-11-27 16:26 ` Sebastian Kemper
2016-11-26 23:02 ` Sebastian Kemper
2016-11-28 21:36 ` Khem Raj
2016-11-28 21:53 ` 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=alpine.LNX.2.20.13.1611271424270.2229@monopod.intra.ispras.ru \
--to=amonakov@ispras.ru \
--cc=musl@lists.openwall.com \
--cc=nsz@port70.net \
--cc=sebastian_ml@gmx.net \
/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).