From patchwork Mon Jun 3 12:15:51 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mike Crowe X-Patchwork-Id: 1109217 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=sourceware.org (client-ip=209.132.180.131; helo=sourceware.org; envelope-from=libc-alpha-return-102400-incoming=patchwork.ozlabs.org@sourceware.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=mcrowe.com Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; secure) header.d=sourceware.org header.i=@sourceware.org header.b="AjAPsIrR"; dkim-atps=neutral Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 45HYv21jfnz9s4V for ; Mon, 3 Jun 2019 22:16:29 +1000 (AEST) DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:from:to:cc:subject:date:message-id :mime-version:content-transfer-encoding; q=dns; s=default; b=qZG wInxyVSL4Qd/3bbjVPs/d7QKRQXxkWJtDc0r56evQQektWYA29RO8pyVGkTAZP/F c6FZ/5FAvPqaQ3N1qaF3vMppcLQFO7VhECBYi+716uB6AFz//6ANlP1K3Q3bim7G CNw2TZdivjtEg+VuwfRNNTAVj5rJeujwvc0E0/YM= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:from:to:cc:subject:date:message-id :mime-version:content-transfer-encoding; s=default; bh=HAyIPDe/f dUx0TbJVde8Yr+DAdM=; b=AjAPsIrRnaCztkC6b+DLKe6oYDSKxYyr2Z802Dmc5 1wSi7ECY+RYT+6R0p3TrjmKDY/PG7yeWox8V/FX/vvnI2WydSqChkjPREsOKN3jL tHw+ZIoBjWzwZ5HBfo6SYMY1W3efAhFvuC+Zec8MWYo+XwluRgKnmVqHaPerfKWD 18= Received: (qmail 119354 invoked by alias); 3 Jun 2019 12:16:15 -0000 Mailing-List: contact libc-alpha-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: libc-alpha-owner@sourceware.org Delivered-To: mailing list libc-alpha@sourceware.org Received: (qmail 119279 invoked by uid 89); 3 Jun 2019 12:16:15 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-13.8 required=5.0 tests=AWL, BAYES_00, GIT_PATCH_2, RCVD_IN_DNSWL_LOW autolearn=ham version=3.3.1 spammy=H*r:smtp, continued, UD:php, HContent-Transfer-Encoding:8bit X-HELO: avasout02.plus.net X-CM-Score: 0.00 From: Mike Crowe To: libc-alpha@sourceware.org Cc: Mike Crowe Subject: [PATCH v1 0/4] nptl: Add POSIX-proposed pthread_mutex_clocklock function Date: Mon, 3 Jun 2019 13:15:51 +0100 Message-Id: MIME-Version: 1.0 This series builds upon my previous[1] series adding other POSIX-proposed[2] clockwait/clocklock functions. Since that series hasn't landed yet, I could combine the two if that would make review easier. The series starts by adding the xclock_now() helper function, then converts a few more nptl tests to use libsupport, before renaming lll_timedlock to lll_clocklock and adding a clockid parameter before adding the new function itself: int pthread_mutex_clocklock (pthread_mutex_t *mutex, clockid_t clockid, const struct timespec *abstime) along with updating the tests to test it. I wasn't absolutely certain what to do about the systemtap probe points in pthread_mutex_timedlock.c. I've continued to support the existing mutex_timedlock_entry point for pthread_mutex_timedlock and added a new mutex_clocklock_entry point for pthread_mutex_clocklock. Unfortunately, this means that __pthread_mutex_timedlock can't just call __pthread_mutex_clocklock directly. The lll_timedlock/lll_clocklock changes require modifying the architecture-specific elision-timed.c files. The changes are straightforward and appear to work on x86_64, i686, ARM and AArch64, but I've only compile-and-link-tested them for ppc and s390x. [1] https://sourceware.org/ml/libc-alpha/2019-05/msg00600.html [2] http://austingroupbugs.net/view.php?id=1216 Mike Crowe (4): support: Add xclock_now helper function. nptl: Convert various tests to use libsupport nptl: Rename lll_timedlock to lll_clocklock and add clockid parameter nptl: Add POSIX-proposed pthread_mutex_clocklock ChangeLog | 135 +++++- NEWS | 10 +- nptl/DESIGN-systemtap-probes.txt | 3 +- nptl/Makefile | 2 +- nptl/Versions | 1 +- nptl/eintr.c | 12 +- nptl/lll_timedlock_wait.c | 11 +- nptl/pthread_mutex_timedlock.c | 48 +- nptl/tst-abstime.c | 2 +- nptl/tst-eintr1.c | 52 +-- nptl/tst-eintr2.c | 60 +-- nptl/tst-eintr3.c | 23 +- nptl/tst-eintr4.c | 15 +- nptl/tst-eintr5.c | 40 +-- nptl/tst-mutex-errorcheck.c | 29 +- nptl/tst-mutex11.c | 69 +++- nptl/tst-mutex5.c | 184 +------ nptl/tst-mutex9.c | 151 +----- support/xtime.h | 10 +- sysdeps/nptl/lowlevellock.h | 11 +- sysdeps/nptl/pthread.h | 7 +- sysdeps/unix/sysv/linux/aarch64/libpthread.abilist | 1 +- sysdeps/unix/sysv/linux/alpha/libpthread.abilist | 1 +- sysdeps/unix/sysv/linux/arm/libpthread.abilist | 1 +- sysdeps/unix/sysv/linux/csky/libpthread.abilist | 1 +- sysdeps/unix/sysv/linux/hppa/libpthread.abilist | 1 +- sysdeps/unix/sysv/linux/i386/libpthread.abilist | 1 +- sysdeps/unix/sysv/linux/ia64/libpthread.abilist | 1 +- sysdeps/unix/sysv/linux/m68k/coldfire/libpthread.abilist | 1 +- sysdeps/unix/sysv/linux/m68k/m680x0/libpthread.abilist | 1 +- sysdeps/unix/sysv/linux/microblaze/libpthread.abilist | 1 +- sysdeps/unix/sysv/linux/mips/mips32/libpthread.abilist | 1 +- sysdeps/unix/sysv/linux/mips/mips64/libpthread.abilist | 1 +- sysdeps/unix/sysv/linux/nios2/libpthread.abilist | 1 +- sysdeps/unix/sysv/linux/powerpc/elision-timed.c | 6 +- sysdeps/unix/sysv/linux/powerpc/lowlevellock.h | 9 +- sysdeps/unix/sysv/linux/powerpc/powerpc32/libpthread.abilist | 1 +- sysdeps/unix/sysv/linux/powerpc/powerpc64/be/libpthread.abilist | 1 +- sysdeps/unix/sysv/linux/powerpc/powerpc64/le/libpthread.abilist | 1 +- sysdeps/unix/sysv/linux/riscv/rv64/libpthread.abilist | 1 +- sysdeps/unix/sysv/linux/s390/elision-timed.c | 6 +- sysdeps/unix/sysv/linux/s390/lowlevellock.h | 9 +- sysdeps/unix/sysv/linux/s390/s390-32/libpthread.abilist | 1 +- sysdeps/unix/sysv/linux/s390/s390-64/libpthread.abilist | 1 +- sysdeps/unix/sysv/linux/sh/libpthread.abilist | 1 +- sysdeps/unix/sysv/linux/sparc/sparc32/libpthread.abilist | 1 +- sysdeps/unix/sysv/linux/sparc/sparc64/libpthread.abilist | 1 +- sysdeps/unix/sysv/linux/x86/elision-timed.c | 6 +- sysdeps/unix/sysv/linux/x86/lowlevellock.h | 11 +- sysdeps/unix/sysv/linux/x86_64/64/libpthread.abilist | 1 +- sysdeps/unix/sysv/linux/x86_64/x32/libpthread.abilist | 1 +- 51 files changed, 485 insertions(+), 461 deletions(-) create mode 100644 nptl/tst-mutex11.c base-commit: 15ff018a083b887f3a109fb40c2c91ce60d3ac60