From: "Florian Weimer (Code Review)" <gerrit@gnutoolchain-gerrit.osci.io>
To: Adhemerval Zanella <adhemerval.zanella@linaro.org>,
libc-alpha@sourceware.org
Cc: Florian Weimer <fweimer@redhat.com>
Subject: [review v2] nptl: Add struct_rwlock.h
Date: Thu, 14 Nov 2019 09:37:13 -0500 [thread overview]
Message-ID: <20191114143713.A946020AF6@gnutoolchain-gerrit.osci.io> (raw)
In-Reply-To: <gerrit.1573136666000.I776a6a986c23199929d28a3dcd30272db21cd1d0@gnutoolchain-gerrit.osci.io>
Florian Weimer has posted comments on this change.
Change URL: https://gnutoolchain-gerrit.osci.io/r/c/glibc/+/519
......................................................................
Patch Set 2:
(5 comments)
| --- /dev/null
| +++ /COMMIT_MSG
| @@ -1,0 +1,24 @@
| +Parent: ce345a30 (nptl: Add struct_mutex.h)
| +Author: Adhemerval Zanella <adhemerval.zanella@linaro.org>
| +AuthorDate: 2017-11-09 19:41:02 -0200
| +Commit: Adhemerval Zanella <adhemerval.zanella@linaro.org>
| +CommitDate: 2019-11-08 16:42:56 -0300
| +
| +nptl: Add struct_rwlock.h
| +
| +This patch adds a new generic __pthread_rwlock_arch_t definition meant
| +to be used by new ports. Its layout mimic the current usage on some
PS2, Line 10:
mimics
| +64 bits ports and it allows some ports use the generic definition.
PS2, Line 11:
ports to use
| +The arch __pthread_rwlock_arch_t definition is moved from
| +pthreadtypes-arch.h to another arch-specific header (struct_rwlock.h).
| +
| +Also the static intialization macro for pthread_mutex_t is set to use
PS2, Line 15:
wrong type, should be pthread_rwlock_t
| +an arch defined on (__PTHREAD_RWLOCK_INITIALIZER) which simplifies its
| +implementation.
| +
| +The default pthread_rwlock_t layout differs from current ports with:
| +
| + 1. Internal layout is the same for 32 bits and 64 bits.
| +
| + 2. Internal flag is an unsigned short so it should not required
| + additional padding to align for word boundary (if it is the case
| --- /dev/null
| +++ sysdeps/nptl/bits/struct_rwlock.h
| @@ -1,0 +1,10 @@
| +/* Default internal rwlock struct definitions.
PS2, Line 1:
See previous comment about “internal” on the mutex patch.
| + Copyright (C) 2019 Free Software Foundation, Inc.
| +
| + This file is part of the GNU C Library.
| +
| + The GNU C Library is free software; you can redistribute it and/or
| + modify it under the terms of the GNU Lesser General Public
| + License as published by the Free Software Foundation; either
| + version 2.1 of the License, or (at your option) any later version.
| +
| --- sysdeps/nptl/bits/thread-shared-types.h
| +++ sysdeps/nptl/bits/thread-shared-types.h
| @@ -71,8 +68,19 @@ /* Arch-specific mutex definitions. A generic implementation is provided
| 2. __LOCK_ALIGNMENT for any extra attribute for internal lock used with
| atomic operations.
|
| 3. The macro __PTHREAD_MUTEX_INITIALIZER used for static initialization.
| It should initialize the mutex internal flag. */
|
| #include <bits/struct_mutex.h>
|
| +/* Arch-sepecific read-write lock definitions. A generic implementation is
| + provided by sysdeps/nptl/bits/struct_rwlock.h. If required, an
PS2, Line 77:
Path is not appropriate for an installed header.
| + architecture can override it by defining:
| +
| + 1. struct __pthread_rwlock_arch_t (used on pthread_rwlock_t definition).
| + It should contain at least the internal members defined in the
| + generic version.
| +
| + 2. The macro __PTHREAD_RWLOCK_INITIALIZER used for static initialization.
| + It should initialize the rwlock internal type. */
| +
--
Gerrit-Project: glibc
Gerrit-Branch: master
Gerrit-Change-Id: I776a6a986c23199929d28a3dcd30272db21cd1d0
Gerrit-Change-Number: 519
Gerrit-PatchSet: 2
Gerrit-Owner: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Gerrit-Reviewer: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Gerrit-Reviewer: Florian Weimer <fweimer@redhat.com>
Gerrit-Comment-Date: Thu, 14 Nov 2019 14:37:13 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Gerrit-MessageType: comment
next prev parent reply other threads:[~2019-11-14 14:37 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-11-07 14:24 [review] nptl: Add rwlock-internal.h Adhemerval Zanella (Code Review)
2019-11-07 21:00 ` Florian Weimer (Code Review)
2019-11-08 15:56 ` Adhemerval Zanella (Code Review)
2019-11-08 19:43 ` [review v2] nptl: Add struct_rwlock.h Adhemerval Zanella (Code Review)
2019-11-14 14:37 ` Florian Weimer (Code Review) [this message]
2019-11-20 14:49 ` Adhemerval Zanella (Code Review)
2019-11-20 14:51 ` [review v3] " Adhemerval Zanella (Code Review)
2019-11-22 14:28 ` Florian Weimer (Code Review)
2019-11-26 14:20 ` [pushed] " Sourceware to Gerrit sync (Code Review)
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
List information: https://www.gnu.org/software/libc/involved.html
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20191114143713.A946020AF6@gnutoolchain-gerrit.osci.io \
--to=gerrit@gnutoolchain-gerrit.osci.io \
--cc=adhemerval.zanella@linaro.org \
--cc=fweimer@redhat.com \
--cc=gnutoolchain-gerrit@osci.io \
--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).