public inbox for libc-alpha@sourceware.org
 help / color / mirror / Atom feed
From: Florian Weimer <fweimer@redhat.com>
To: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Cc: libc-alpha@sourceware.org
Subject: Re: [PATCH 6/6] nptl: Move elision implementations into libc
Date: Mon, 22 Feb 2021 18:02:06 +0100	[thread overview]
Message-ID: <874ki43uk1.fsf@oldenburg.str.redhat.com> (raw)
In-Reply-To: <6d274cde-bfed-49fb-5cda-cf438e18ad93@linaro.org> (Adhemerval Zanella's message of "Mon, 22 Feb 2021 13:53:25 -0300")

* Adhemerval Zanella:

>> +/* Automatically enable elision for existing user lock kinds.  */
>> +# define FORCE_ELISION(m, s)                                            \
>> +  if (__pthread_force_elision)                                          \
>> +    {                                                                   \

>> +      if ((mutex_kind & PTHREAD_MUTEX_ELISION_NP) != 0)                 \
>> +        {                                                               \
>> +          s;                                                            \
>> +        }                                                               \
>> +    }
>
> Maybe since you are refactoring it, to use a static inline instead of macro
> here?

That's not possible due to the way the s parameter is used.

>> diff --git a/sysdeps/unix/sysv/linux/powerpc/pthread_mutex_timedlock.c b/sysdeps/pthread/elision-conf.h
>> similarity index 64%
>> rename from sysdeps/unix/sysv/linux/powerpc/pthread_mutex_timedlock.c
>> rename to sysdeps/pthread/elision-conf.h
>> index 6f8b06d459..6635a7c56f 100644

>> +/* No elision support by default.  */
>> +#define HAVE_ELISION 0
>
> Maybe prepend the define with a string related to code it relates to,
> like 'ELISION_CONF_'? This links the define more directly to the
> implementation, since HAVE_* is usually defined by config.h.

Like ENABLE_ELISION_SUPPORT instead of HAVE_ELISION?  Fine.  I just
reused what was there.

The elision-conf.h file name is also not 100% appropriate given those
two defines.

Thanks for the review.

Florian


      reply	other threads:[~2021-02-22 17:01 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-02-17 17:21 [PATCH 0/6] More libpthread removal preparations Florian Weimer
2021-02-17 17:21 ` [PATCH 1/6] nptl: Split libpthread-routines into one routine per line Florian Weimer
2021-02-22 14:23   ` Adhemerval Zanella
2021-02-17 17:21 ` [PATCH 2/6] nptl: Reformat Versions Florian Weimer
2021-02-22 16:31   ` Adhemerval Zanella
2021-02-17 17:21 ` [PATCH 3/6] nptl: Move futex-internal.c into main nptl directory Florian Weimer
2021-02-22 16:34   ` Adhemerval Zanella
2021-02-17 17:21 ` [PATCH 4/6] nptl: Move lowlevellock into libc Florian Weimer
2021-02-22 16:38   ` Adhemerval Zanella
2021-02-22 16:46     ` Florian Weimer
2021-02-17 17:21 ` [PATCH 5/6] nptl: Move futex-internal " Florian Weimer
2021-02-22 16:39   ` Adhemerval Zanella
2021-02-17 17:22 ` [PATCH 6/6] nptl: Move elision implementations " Florian Weimer
2021-02-22 16:53   ` Adhemerval Zanella
2021-02-22 17:02     ` Florian Weimer [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=874ki43uk1.fsf@oldenburg.str.redhat.com \
    --to=fweimer@redhat.com \
    --cc=adhemerval.zanella@linaro.org \
    --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).