From patchwork Wed Jul 17 08:43:10 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mike Crowe X-Patchwork-Id: 1133197 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-103726-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="EFuTtw/j"; 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 45pW4x2GPDz9s8m for ; Wed, 17 Jul 2019 18:43: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=WLc OQ0dFZf3VxqOMRQDhY912N9T4b2ULlDpQaQiO+fsqg5wMU3SdVaxR5SyYYQftF3H nCIqk9SaoCPYX2cbl3HwWTRsDG1V1SuQyItNdpYM2Czv3HkA/+/p1Q0PpspdFl6F h9eVuE+27Fr9raGXB+wAsvjvWKqXnnWnWOVlHcM4= 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=jE+Opd0Vo FmfZ39hjaTjQNslYg8=; b=EFuTtw/j/Rhra+293rC9PL2bQQnau3Wd30tyxk8BS SZIwar4pSFmf3IrL9KHBIOCLyTmzd/jPynBuwbVpY7cO8cha3797/BTsqNG+VWAG Q6Kx7iZavsVd1fvFvYI1ADWLNIQOv3vI9z/M0PNSUB3OhbYXCfnzlQeyUcjv2AGQ os= Received: (qmail 54751 invoked by alias); 17 Jul 2019 08:43:23 -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 54566 invoked by uid 89); 17 Jul 2019 08:43:23 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-23.1 required=5.0 tests=AWL, BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, RCVD_IN_DNSWL_LOW autolearn=ham version=3.3.1 spammy=HContent-Transfer-Encoding:8bit X-HELO: avasout02.plus.net X-Clacks-Overhead: "GNU Terry Pratchett" X-CM-Score: 0.00 From: Mike Crowe To: libc-alpha@sourceware.org, Florian Weimer , Adhemerval Zanella , Carlos O'Donell Cc: Mike Crowe Subject: [PATCH] nptl: Add POSIX-proposed _clock functions to hppa pthread.h Date: Wed, 17 Jul 2019 09:43:10 +0100 Message-Id: <20190717084310.28424-1-mac@mcrowe.com> MIME-Version: 1.0 The pthread _clock functions that were recently added to nptl need to be declared in hppa's pthread.h too. After this change, the function declaration part of sysdeps/nptl/pthread.h and sysdeps/unix/sysv/linux/hppa/pthread.h are identical. * sysdeps/unix/sysv/linux/hppa/pthread.h: Add declarations of functions recently added to sysdeps/nptl/pthread.h: pthread_mutex_clocklock, pthread_rwlock_clockrdlock, pthread_rwlock_clockwrlock and pthread_cond_clockwait. Reviewed-by: Adhemerval Zanella --- ChangeLog | 7 +++++ sysdeps/unix/sysv/linux/hppa/pthread.h | 36 ++++++++++++++++++++++++++ 2 files changed, 43 insertions(+) I ran "build-many-glibcs.py [..] glibcs hppa-linux-gnu" successfully after this change, but that's all. I've been unable to find an hppa machine on the GCC farm. :( diff --git a/ChangeLog b/ChangeLog index 3d884f2925..c2e3be57d2 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2019-07-17 Mike Crowe + + * sysdeps/unix/sysv/linux/hppa/pthread.h: Add declarations of + functions recently added to sysdeps/nptl/pthread.h: + pthread_mutex_clocklock, pthread_rwlock_clockrdlock, + pthread_rwlock_clockwrlock and pthread_cond_clockwait. + 2019-07-16 Mike Crowe * nptl/forward.c: Remove unnecessary __pthread_cond_clockwait and diff --git a/sysdeps/unix/sysv/linux/hppa/pthread.h b/sysdeps/unix/sysv/linux/hppa/pthread.h index 45e706c037..5a1c641515 100644 --- a/sysdeps/unix/sysv/linux/hppa/pthread.h +++ b/sysdeps/unix/sysv/linux/hppa/pthread.h @@ -746,6 +746,13 @@ extern int pthread_mutex_timedlock (pthread_mutex_t *__restrict __mutex, __abstime) __THROWNL __nonnull ((1, 2)); #endif +#ifdef __USE_GNU +extern int pthread_mutex_clocklock (pthread_mutex_t *__restrict __mutex, + clockid_t __clockid, + const struct timespec *__restrict + __abstime) __THROWNL __nonnull ((1, 3)); +#endif + /* Unlock a mutex. */ extern int pthread_mutex_unlock (pthread_mutex_t *__mutex) __THROWNL __nonnull ((1)); @@ -885,6 +892,13 @@ extern int pthread_rwlock_timedrdlock (pthread_rwlock_t *__restrict __rwlock, __abstime) __THROWNL __nonnull ((1, 2)); # endif +# ifdef __USE_GNU +extern int pthread_rwlock_clockrdlock (pthread_rwlock_t *__restrict __rwlock, + clockid_t __clockid, + const struct timespec *__restrict + __abstime) __THROWNL __nonnull ((1, 3)); +# endif + /* Acquire write lock for RWLOCK. */ extern int pthread_rwlock_wrlock (pthread_rwlock_t *__rwlock) __THROWNL __nonnull ((1)); @@ -900,6 +914,13 @@ extern int pthread_rwlock_timedwrlock (pthread_rwlock_t *__restrict __rwlock, __abstime) __THROWNL __nonnull ((1, 2)); # endif +# ifdef __USE_GNU +extern int pthread_rwlock_clockwrlock (pthread_rwlock_t *__restrict __rwlock, + clockid_t __clockid, + const struct timespec *__restrict + __abstime) __THROWNL __nonnull ((1, 3)); +# endif + /* Unlock RWLOCK. */ extern int pthread_rwlock_unlock (pthread_rwlock_t *__rwlock) __THROWNL __nonnull ((1)); @@ -979,6 +1000,21 @@ extern int pthread_cond_timedwait (pthread_cond_t *__restrict __cond, const struct timespec *__restrict __abstime) __nonnull ((1, 2, 3)); +# ifdef __USE_GNU +/* Wait for condition variable COND to be signaled or broadcast until + ABSTIME measured by the specified clock. MUTEX is assumed to be + locked before. CLOCK is the clock to use. ABSTIME is an absolute + time specification against CLOCK's epoch. + + This function is a cancellation point and therefore not marked with + __THROW. */ +extern int pthread_cond_clockwait (pthread_cond_t *__restrict __cond, + pthread_mutex_t *__restrict __mutex, + __clockid_t __clock_id, + const struct timespec *__restrict __abstime) + __nonnull ((1, 2, 4)); +# endif + /* Functions for handling condition variable attributes. */ /* Initialize condition variable attribute ATTR. */