This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH 2/6] Move mutex and condition variable definition to common header
- From: Torvald Riegel <triegel at redhat dot com>
- To: Adhemerval Zanella <adhemerval dot zanella at linaro dot org>
- Cc: libc-alpha at sourceware dot org
- Date: Mon, 27 Mar 2017 15:43:19 +0200
- Subject: Re: [PATCH 2/6] Move mutex and condition variable definition to common header
- Authentication-results: sourceware.org; auth=none
- Authentication-results: ext-mx06.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com
- Authentication-results: ext-mx06.extmail.prod.ext.phx2.redhat.com; spf=pass smtp.mailfrom=triegel at redhat dot com
- Dkim-filter: OpenDKIM Filter v2.11.0 mx1.redhat.com EDABA3D97F
- Dmarc-filter: OpenDMARC Filter v1.3.2 mx1.redhat.com EDABA3D97F
- References: <1490103612-9401-1-git-send-email-adhemerval.zanella@linaro.org> <1490103612-9401-3-git-send-email-adhemerval.zanella@linaro.org>
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.