This is the mail archive of the mailing list for the libc-ports project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: PI mutex support for pthread_cond_* now in nptl

On 2013-02-18 02:56, Siddhesh Poyarekar wrote:
Hi arch-maintainers!

The x86 assembly code for pthread_cond_* functions has, since some
time now, been capable of utilizing PI mutexes (using
PTHREAD_PRIO_INHERIT when initializing a mutex) optimally by using the
requeue waiters woken on pthread_cond_broadcast to the PI mutex while
waking just one child, hence avoiding the thundering herd effect.
This code is now available on the default C implementation in master,
which is used by most non-x86 architectures in glibc.

To allow your architecture to use this, you need to define the

- lll_futex_wait_requeue_pi macro to call the FUTEX_WAIT_REQUEUE_PI
   operation in a futex syscall.

- lll_futex_timed_wait_requeue_pi, which is the timed equivalent of
   the above.

- lll_futex_cmp_requeue_pi to call FUTEX_CMP_REQUEUE_PI.

I have committed implementations for s390 and powerpc, which can be
used as examples for implementation on other architectures.

Any chance we can move these macros into a generic linux header?
Given that we're using INTERNAL_SYSCALL macros, the definitions ought to be the same for all targets.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]