This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
[PATCH v2 0/6] Add new helper functions+macros to libsupport and use them in some nptl tests
- From: Mike Crowe <mac at mcrowe dot com>
- To: libc-alpha at sourceware dot org
- Cc: Mike Crowe <mac at mcrowe dot com>
- Date: Sun, 7 Apr 2019 20:33:49 +0100
- Subject: [PATCH v2 0/6] Add new helper functions+macros to libsupport and use them in some nptl tests
In preparation for adding support for the _clockwait family of
functions, modify various tests to:
1. use struct timespec rather than struct timeval
2. use libsupport.
This requires adding a new support/timespec.h and support/xtime.h
containing helper functions and macros along with timespec_sub and
timespec_add implementations from gnulib.
Thanks to Adhemerval Zanella for providing lots of help and advice
with these patches. They haven't been reviewed yet, so the flaws are
all my own.
Changes since v1[1]:
* Many whitespace fixes.
* The check macros in timespec.h now call out-of-line functions rather
than containing the code themselves.
* Take better timespec_add and timespec_sub implementations from
gnulib.
* Use xclock_gettime in more places.
* Split addition of support/timespec.h into a separate patch.
* Combine two separate rwlock patches into one to hopefully make
review easier.
* Use even more x* wrapper functions.
[1] https://lwn.net/ml/libc-alpha/cover.13c2d68f411f9010956e8e52edfbe168964e1e5c.1553797867.git-series.mac%40mcrowe.com/
Mike Crowe (6):
support: Add xclock_gettime
support: Add timespec-related helper functions
nptl: Convert tst-cond11.c to use libsupport
nptl: Use recent additions to libsupport in tst-sem5
nptl: Convert some rwlock tests to use libsupport
nptl/tst-abstime: Use libsupport
ChangeLog | 51 ++++++++++++-
nptl/tst-abstime.c | 70 ++++-------------
nptl/tst-cond11.c | 169 ++++++++--------------------------------
nptl/tst-rwlock14.c | 122 ++++-------------------------
nptl/tst-rwlock6.c | 146 ++++++-----------------------------
nptl/tst-rwlock7.c | 119 ++++++----------------------
nptl/tst-rwlock9.c | 96 +++++------------------
nptl/tst-sem5.c | 23 +----
support/Makefile | 4 +-
support/README | 6 +-
support/timespec-add.c | 75 ++++++++++++++++++-
support/timespec-sub.c | 75 ++++++++++++++++++-
support/timespec.c | 63 +++++++++++++++-
support/timespec.h | 79 +++++++++++++++++++-
support/xclock_gettime.c | 29 +++++++-
support/xtime.h | 33 ++++++++-
16 files changed, 571 insertions(+), 589 deletions(-)
create mode 100644 support/timespec-add.c
create mode 100644 support/timespec-sub.c
create mode 100644 support/timespec.c
create mode 100644 support/timespec.h
create mode 100644 support/xclock_gettime.c
create mode 100644 support/xtime.h
base-commit: 94e358f6d490650c714edb1ffc3a52f56ffe086e
--
git-series 0.9.1