This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
[PATCH 0/5] 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: Thu, 2 May 2019 21:54:30 +0100
- Subject: [PATCH 0/5] 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.
Changes since v2[2]:
* A few more whitespace fixes
* Reformat copyright notices in timespec-add.c and timespec-sub.c to
match those used in posix/getopt.c which also comes from gnulib.
* xclock_gettime use FAIL_EXIT1 rather than xpthread_check_return.
* timespec.c: stop preserving errno.
* tst-sem5: Reinstate comment describing length of wait.
* Fix change log in commit message to match actual ChangeLog addition.
* Use xpthread_join in tst-abstime.c.
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/
[2] https://lwn.net/ml/libc-alpha/cover.418ef3e533dac34f464166a596c7f6adeeb5d5d1.1554665560.git-series.mac%40mcrowe.com/
Mike Crowe (5):
support: Add xclock_gettime
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 | 49 ++++++++++++-
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 | 21 +----
support/Makefile | 4 +-
support/README | 6 +-
support/timespec-add.c | 71 +++++++++++++++++-
support/timespec-sub.c | 71 +++++++++++++++++-
support/timespec.c | 58 ++++++++++++++-
support/timespec.h | 79 +++++++++++++++++++-
support/xclock_gettime.c | 31 +++++++-
support/xtime.h | 33 ++++++++-
16 files changed, 558 insertions(+), 587 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: 7dfde28a211400dc3b52610198478325a487e02b
--
git-series 0.9.1