From: Szabolcs Nagy <nsz@port70.net>
To: musl@lists.openwall.com
Subject: Re: [PATCH] unify the use of FUTEX_PRIVATE
Date: Sat, 24 Jun 2017 18:40:26 +0200 [thread overview]
Message-ID: <20170624164026.GA677@port70.net> (raw)
In-Reply-To: <868874$8bedh6@mail2-relais-roc.national.inria.fr>
* Jens Gustedt <Jens.Gustedt@inria.fr> [2017-06-24 10:18:05 +0200]:
> The flag 1<<7 is used in several places for different purposes that are
> not always easy to distinguish. Mark those usages that correspond to the
> flag that is used by the kernel for futexes.
> ---
> src/internal/pthread_impl.h | 2 +-
> src/thread/__timedwait.c | 2 +-
> src/thread/pthread_barrier_wait.c | 2 +-
> src/thread/pthread_cond_timedwait.c | 2 +-
> 4 files changed, 4 insertions(+), 4 deletions(-)
>
i see further use of 128
src/thread/pthread_attr_get.c: *pshared = a->__attr / 128U % 2;
src/thread/pthread_cond_timedwait.c: unlock_requeue(&node.prev->barrier, &m->_m_lock, m->_m_type & 128);
src/thread/pthread_create.c: int priv = (m->_m_type & 128) ^ 128;
src/thread/pthread_mutex_timedlock.c: int r, t, priv = (m->_m_type & 128) ^ 128;
src/thread/pthread_mutex_trylock.c: if (m->_m_type & 128) {
src/thread/pthread_mutex_unlock.c: int priv = (m->_m_type & 128) ^ 128;
src/thread/pthread_mutexattr_setpshared.c: a->__attr &= ~128U;
src/thread/pthread_rwlock_init.c: if (a) rw->_rw_shared = a->__attr[0]*128;
src/thread/pthread_rwlock_timedrdlock.c: r = __timedwait(&rw->_rw_lock, t, CLOCK_REALTIME, at, rw->_rw_shared^128);
src/thread/pthread_rwlock_timedwrlock.c: r = __timedwait(&rw->_rw_lock, t, CLOCK_REALTIME, at, rw->_rw_shared^128);
src/thread/pthread_rwlock_unlock.c: int val, cnt, waiters, new, priv = rw->_rw_shared^128;
src/thread/sem_init.c: sem->__val[2] = pshared ? 0 : 128;
i think some of these are the same flag
next prev parent reply other threads:[~2017-06-24 16:40 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-06-24 8:18 Jens Gustedt
2017-06-24 16:40 ` Szabolcs Nagy [this message]
2017-06-24 17:51 ` Jens Gustedt
2017-06-24 21:31 ` Jens Gustedt
2017-06-24 22:16 ` Rich Felker
2017-06-25 7:29 ` Jens Gustedt
2017-07-04 21:14 ` 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=20170624164026.GA677@port70.net \
--to=nsz@port70.net \
--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).