public inbox for libc-alpha@sourceware.org
 help / color / mirror / Atom feed
From: Adhemerval Zanella <adhemerval.zanella@linaro.org>
To: Torvald Riegel <triegel@redhat.com>
Cc: libc-alpha@sourceware.org
Subject: Re: [PATCH 2/6] Move mutex and condition variable definition to common header
Date: Mon, 27 Mar 2017 14:25:00 -0000	[thread overview]
Message-ID: <3fd660cf-8415-cb52-a922-c8eb53a4f875@linaro.org> (raw)
In-Reply-To: <1490622199.26906.437.camel@redhat.com>



On 27/03/2017 10:43, Torvald Riegel wrote:
> On Tue, 2017-03-21 at 10:40 -0300, Adhemerval Zanella wrote:
>> This patch sorts out pthread_mutex_t and pthread_cond_t in new files,
>> so new C11 types could be based on pthread types without corrupting
>> namespaces and exposing pthread symbols.
>>
>> Common pthread types like pthread_mutex_t and pthread_cond_t are now
>> defined in arch specific bits/pthreadtypes-common.h headers, while the
>> internal implementation is moved to bits/thread-shared-types.h.  File
>> pthreadtypes.h is cleaned up of those definitions and some related macros
>> and structures.
> 
> If we are moving declarations in pthreadtypes.h around, can we just
> merge those that are common?  Most of the archs just use the same
> generic code or at least the same underlying data structure; most of the
> differences I remember where some additional alignment requirements,
> which probably could be handled by an additional macro that
> arch-specific files have to define.
> 

I would also like to consolidate the pthreadtypes definition in one header,
however I rather than make it on a following patchset instead.  But I think
have the correct approach is required to avoid a double refactor.  I chose
to keep using the macros (__PTHREAD_COND_T_CONTENT and __PTHREAD_MUTEX_T_CONTENT)
because it is the most straightforward arrange, however maybe using a composed
struct with defines to access the direct member could be a better strategy.
Thoughts? 

  reply	other threads:[~2017-03-27 14:25 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-03-21 13:40 [PATCH v3 0/6] Add support for ISO C11 threads.h Adhemerval Zanella
2017-03-21 13:40 ` [PATCH 2/6] Move mutex and condition variable definition to common header Adhemerval Zanella
2017-03-22 22:59   ` Ivo Raisr
2017-03-27 13:43   ` Torvald Riegel
2017-03-27 14:25     ` Adhemerval Zanella [this message]
2017-03-28  8:19       ` Torvald Riegel
2017-03-31 13:43         ` Adhemerval Zanella
2017-03-21 13:40 ` [PATCH 5/6] Add test cases for ISO C11 threads Adhemerval Zanella
2017-03-21 13:40 ` [PATCH 6/6] Add manual documentation for threads.h Adhemerval Zanella
2017-03-21 13:40 ` [PATCH 4/6] Add C11 threads support Adhemerval Zanella
2017-03-21 13:40 ` [PATCH 3/6] Clean pthread functions namespaces for C11 threads Adhemerval Zanella
2017-03-21 13:40 ` [PATCH 1/6] Consolidate pthreadtype.h placement Adhemerval Zanella
2017-03-21 13:48   ` Andreas Schwab
2017-03-21 15:07     ` Adhemerval Zanella
2017-03-21 16:25 ` [PATCH v3 0/6] Add support for ISO C11 threads.h Joseph Myers
2017-03-21 16:44   ` Adhemerval Zanella
2017-03-21 16:49     ` Joseph Myers
2017-03-21 17:08       ` Adhemerval Zanella
2017-03-21 20:10       ` Adhemerval Zanella
2017-03-27 13:29         ` Torvald Riegel
2017-03-27 13:29       ` Torvald Riegel
2017-03-27 16:10         ` Martin Sebor
2017-03-28  8:08           ` Torvald Riegel
2017-03-31 13:39             ` Adhemerval Zanella
2017-04-06 11:05               ` Torvald Riegel
2017-04-06 14:30                 ` Adhemerval Zanella

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=3fd660cf-8415-cb52-a922-c8eb53a4f875@linaro.org \
    --to=adhemerval.zanella@linaro.org \
    --cc=libc-alpha@sourceware.org \
    --cc=triegel@redhat.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.
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).