Openwall GNU/*/Linux - a small security-enhanced Linux distro for servers
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Sat, 24 Jun 2017 18:40:26 +0200
From: Szabolcs Nagy <nsz@...t70.net>
To: musl@...ts.openwall.com
Subject: Re: [PATCH] unify the use of FUTEX_PRIVATE

* Jens Gustedt <Jens.Gustedt@...ia.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

Powered by blists - more mailing lists

Your e-mail address:

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