public inbox for libc-alpha@sourceware.org
 help / color / mirror / Atom feed
From: Adhemerval Zanella <adhemerval.zanella@linaro.org>
To: Florian Weimer <fweimer@redhat.com>
Cc: libc-alpha@sourceware.org
Subject: Re: [PATCH] nptl: Use out-of-line wake function in __libc_lock_unlock slow path
Date: Thu, 8 Jul 2021 15:27:31 -0300	[thread overview]
Message-ID: <98b87d4c-c9e5-017b-6665-6feebc79130c@linaro.org> (raw)
In-Reply-To: <87a6mwll4a.fsf@oldenburg.str.redhat.com>



On 08/07/2021 15:24, Florian Weimer wrote:
> * Adhemerval Zanella:
> 
>>> diff --git a/nptl/lowlevellock.c b/nptl/lowlevellock.c
>>> index 2d077d8694..4f88178964 100644
>>> --- a/nptl/lowlevellock.c
>>> +++ b/nptl/lowlevellock.c
>>> @@ -52,6 +52,20 @@ __lll_lock_wait (int *futex, int private)
>>>  }
>>>  libc_hidden_def (__lll_lock_wait)
>>>  
>>> +void
>>> +__lll_lock_wake_private (int *futex)
>>> +{
>>> +  lll_futex_wake (futex, 1, LLL_PRIVATE);
>>> +}
>>> +libc_hidden_def (__lll_lock_wake_private)
>>> +
>>> +void
>>> +__lll_lock_wake (int *futex, int private)
>>> +{
>>> +  lll_futex_wake (futex, 1, private);
>>> +}
>>> +libc_hidden_def (__lll_lock_wake)
>>> +
>>>  #if ENABLE_ELISION_SUPPORT
>>>  int __pthread_force_elision __attribute__ ((nocommon));
>>>  libc_hidden_data_def (__pthread_force_elision)
>>
>> Do we really need two functions for this?
> 
> It mirrors the wait side, which has two functions as well.  We probably
> only need __lll_lock_wake_private these days, but I didn't want to start
> cleaning up the libc-lock implementation with its deep macro nesting.

Fair enough.

Reviewed-by: Adhemerval Zanella  <adhemerval.zanella@linaro.org>

      reply	other threads:[~2021-07-08 18:27 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-07-07 14:52 Florian Weimer
2021-07-08 18:17 ` Adhemerval Zanella
2021-07-08 18:24   ` Florian Weimer
2021-07-08 18:27     ` Adhemerval Zanella [this message]

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=98b87d4c-c9e5-017b-6665-6feebc79130c@linaro.org \
    --to=adhemerval.zanella@linaro.org \
    --cc=fweimer@redhat.com \
    --cc=libc-alpha@sourceware.org \
    /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.
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 read-only IMAP folder(s) and NNTP newsgroup(s).