From patchwork Thu Jun 3 23:17:24 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Florian Weimer X-Patchwork-Id: 1487526 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=sourceware.org (client-ip=8.43.85.97; helo=sourceware.org; envelope-from=libc-alpha-bounces+incoming=patchwork.ozlabs.org@sourceware.org; receiver=) Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; secure) header.d=sourceware.org header.i=@sourceware.org header.a=rsa-sha256 header.s=default header.b=VJiJbzBy; dkim-atps=neutral Received: from sourceware.org (ip-8-43-85-97.sourceware.org [8.43.85.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4Fx2TY2n56z9sRf for ; Fri, 4 Jun 2021 09:41:05 +1000 (AEST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 63B5A39960C7 for ; Thu, 3 Jun 2021 23:41:03 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 63B5A39960C7 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1622763663; bh=8BYttu2zpB3LGCASDZhzA76nwO6mMOiqtWfZOQ5S124=; h=To:Subject:In-Reply-To:References:Date:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To: From; b=VJiJbzBysYjtozUh4PT3k9FkBE2jEV+hn/nJMHXssu7lDAYKR5nV/zzPr/EnVzOVs IqcMk3B29nNYwfNCNgxtIYcu+MicMnyeqJrEVG4voH8GM2gzQZuSPQmfpt67eorXsL OcuDuKf0K7bSOISi08JMK8ZfIlp58Bmoo42FVuLo= X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [216.205.24.124]) by sourceware.org (Postfix) with ESMTP id A9957399041A for ; Thu, 3 Jun 2021 23:17:30 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org A9957399041A Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-177-JS-aOtU1O3WhJAMzz8e1fQ-1; Thu, 03 Jun 2021 19:17:28 -0400 X-MC-Unique: JS-aOtU1O3WhJAMzz8e1fQ-1 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id DDCBF107ACCD for ; Thu, 3 Jun 2021 23:17:27 +0000 (UTC) Received: from oldenburg.str.redhat.com (ovpn-113-228.ams2.redhat.com [10.36.113.228]) by smtp.corp.redhat.com (Postfix) with ESMTPS id D337760657 for ; Thu, 3 Jun 2021 23:17:26 +0000 (UTC) To: libc-alpha@sourceware.org Subject: [PATCH 30/35] Linux: Define TIMER_T_WAS_INT_COMPAT in kernel-posix-timers.h In-Reply-To: References: X-From-Line: 2222ff7caf5218113fbbdc35bc3feeafea14ad83 Mon Sep 17 00:00:00 2001 Message-Id: <2222ff7caf5218113fbbdc35bc3feeafea14ad83.1622761829.git.fweimer@redhat.com> Date: Fri, 04 Jun 2021 01:17:24 +0200 User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux) MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com X-Spam-Status: No, score=-12.7 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, KAM_SHORT, RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H4, RCVD_IN_MSPIKE_WL, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: libc-alpha@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Libc-alpha mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: Florian Weimer via Libc-alpha From: Florian Weimer Reply-To: Florian Weimer Errors-To: libc-alpha-bounces+incoming=patchwork.ozlabs.org@sourceware.org Sender: "Libc-alpha" This is almost equivalent to __WORDSIZE == 64 && OTHER_SHLIB_COMPAT (librt, GLIBC_2_1, GLIBC_2_3_3), except that this expression is true for mips64/n64 targets as well, even though those did not undergo the timer_t transition. For the architecture-specific override to work, it is necessary to switch from "..." includes to <...> includes. --- .../sysv/linux/alpha/kernel-posix-timers.h | 22 +++++++++++++++++++ .../sysv/linux/ia64/kernel-posix-timers.h | 22 +++++++++++++++++++ sysdeps/unix/sysv/linux/kernel-posix-timers.h | 4 ++++ .../powerpc/powerpc64/kernel-posix-timers.h | 22 +++++++++++++++++++ .../linux/s390/s390-64/kernel-posix-timers.h | 22 +++++++++++++++++++ .../linux/sparc/sparc64/kernel-posix-timers.h | 22 +++++++++++++++++++ sysdeps/unix/sysv/linux/timer_create.c | 2 +- sysdeps/unix/sysv/linux/timer_delete.c | 2 +- sysdeps/unix/sysv/linux/timer_getoverr.c | 2 +- sysdeps/unix/sysv/linux/timer_gettime.c | 2 +- sysdeps/unix/sysv/linux/timer_routines.c | 2 +- sysdeps/unix/sysv/linux/timer_settime.c | 2 +- .../linux/x86_64/64/kernel-posix-timers.h | 22 +++++++++++++++++++ .../unix/sysv/linux/x86_64/timer_gettime.c | 2 +- .../unix/sysv/linux/x86_64/timer_settime.c | 2 +- 15 files changed, 144 insertions(+), 8 deletions(-) create mode 100644 sysdeps/unix/sysv/linux/alpha/kernel-posix-timers.h create mode 100644 sysdeps/unix/sysv/linux/ia64/kernel-posix-timers.h create mode 100644 sysdeps/unix/sysv/linux/powerpc/powerpc64/kernel-posix-timers.h create mode 100644 sysdeps/unix/sysv/linux/s390/s390-64/kernel-posix-timers.h create mode 100644 sysdeps/unix/sysv/linux/sparc/sparc64/kernel-posix-timers.h create mode 100644 sysdeps/unix/sysv/linux/x86_64/64/kernel-posix-timers.h diff --git a/sysdeps/unix/sysv/linux/alpha/kernel-posix-timers.h b/sysdeps/unix/sysv/linux/alpha/kernel-posix-timers.h new file mode 100644 index 0000000000..e84dfb97e5 --- /dev/null +++ b/sysdeps/unix/sysv/linux/alpha/kernel-posix-timers.h @@ -0,0 +1,22 @@ +/* POSIX timers support functionality. alpha version. + Copyright (C) 2021 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. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; see the file COPYING.LIB. If + not, see . */ + +#include + +#undef TIMER_T_WAS_INT_COMPAT +#define TIMER_T_WAS_INT_COMPAT 1 diff --git a/sysdeps/unix/sysv/linux/ia64/kernel-posix-timers.h b/sysdeps/unix/sysv/linux/ia64/kernel-posix-timers.h new file mode 100644 index 0000000000..fb00698cf7 --- /dev/null +++ b/sysdeps/unix/sysv/linux/ia64/kernel-posix-timers.h @@ -0,0 +1,22 @@ +/* POSIX timers support functionality. ia64 version. + Copyright (C) 2021 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. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; see the file COPYING.LIB. If + not, see . */ + +#include + +#undef TIMER_T_WAS_INT_COMPAT +#define TIMER_T_WAS_INT_COMPAT 1 diff --git a/sysdeps/unix/sysv/linux/kernel-posix-timers.h b/sysdeps/unix/sysv/linux/kernel-posix-timers.h index 17fc32d48f..874b809eba 100644 --- a/sysdeps/unix/sysv/linux/kernel-posix-timers.h +++ b/sysdeps/unix/sysv/linux/kernel-posix-timers.h @@ -103,3 +103,7 @@ timerid_to_kernel_timer (timer_t timerid) else return (kernel_timer_t) ((uintptr_t) timerid); } + +/* New targets use int instead of timer_t. The difference only + matters on 64-bit targets. */ +#define TIMER_T_WAS_INT_COMPAT 0 diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc64/kernel-posix-timers.h b/sysdeps/unix/sysv/linux/powerpc/powerpc64/kernel-posix-timers.h new file mode 100644 index 0000000000..718750db92 --- /dev/null +++ b/sysdeps/unix/sysv/linux/powerpc/powerpc64/kernel-posix-timers.h @@ -0,0 +1,22 @@ +/* POSIX timers support functionality. powerpc64 version. + Copyright (C) 2021 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. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; see the file COPYING.LIB. If + not, see . */ + +#include + +#undef TIMER_T_WAS_INT_COMPAT +#define TIMER_T_WAS_INT_COMPAT 1 diff --git a/sysdeps/unix/sysv/linux/s390/s390-64/kernel-posix-timers.h b/sysdeps/unix/sysv/linux/s390/s390-64/kernel-posix-timers.h new file mode 100644 index 0000000000..c8870c2dc1 --- /dev/null +++ b/sysdeps/unix/sysv/linux/s390/s390-64/kernel-posix-timers.h @@ -0,0 +1,22 @@ +/* POSIX timers support functionality. s390x version. + Copyright (C) 2021 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. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; see the file COPYING.LIB. If + not, see . */ + +#include + +#undef TIMER_T_WAS_INT_COMPAT +#define TIMER_T_WAS_INT_COMPAT 1 diff --git a/sysdeps/unix/sysv/linux/sparc/sparc64/kernel-posix-timers.h b/sysdeps/unix/sysv/linux/sparc/sparc64/kernel-posix-timers.h new file mode 100644 index 0000000000..b8485379ca --- /dev/null +++ b/sysdeps/unix/sysv/linux/sparc/sparc64/kernel-posix-timers.h @@ -0,0 +1,22 @@ +/* POSIX timers support functionality. sparc64 version. + Copyright (C) 2021 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. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; see the file COPYING.LIB. If + not, see . */ + +#include + +#undef TIMER_T_WAS_INT_COMPAT +#define TIMER_T_WAS_INT_COMPAT 1 diff --git a/sysdeps/unix/sysv/linux/timer_create.c b/sysdeps/unix/sysv/linux/timer_create.c index b21b0ca949..3dcd5455fc 100644 --- a/sysdeps/unix/sysv/linux/timer_create.c +++ b/sysdeps/unix/sysv/linux/timer_create.c @@ -25,7 +25,7 @@ #include #include #include -#include "kernel-posix-timers.h" +#include #include "kernel-posix-cpu-timers.h" diff --git a/sysdeps/unix/sysv/linux/timer_delete.c b/sysdeps/unix/sysv/linux/timer_delete.c index a7a183591e..ee8c364d95 100644 --- a/sysdeps/unix/sysv/linux/timer_delete.c +++ b/sysdeps/unix/sysv/linux/timer_delete.c @@ -20,7 +20,7 @@ #include #include #include -#include "kernel-posix-timers.h" +#include #ifdef timer_delete_alias diff --git a/sysdeps/unix/sysv/linux/timer_getoverr.c b/sysdeps/unix/sysv/linux/timer_getoverr.c index 9c7ba3acad..b997290768 100644 --- a/sysdeps/unix/sysv/linux/timer_getoverr.c +++ b/sysdeps/unix/sysv/linux/timer_getoverr.c @@ -19,7 +19,7 @@ #include #include #include -#include "kernel-posix-timers.h" +#include #ifdef timer_getoverrun_alias diff --git a/sysdeps/unix/sysv/linux/timer_gettime.c b/sysdeps/unix/sysv/linux/timer_gettime.c index 193fe3b140..0b31324da7 100644 --- a/sysdeps/unix/sysv/linux/timer_gettime.c +++ b/sysdeps/unix/sysv/linux/timer_gettime.c @@ -21,7 +21,7 @@ #include #include #include -#include "kernel-posix-timers.h" +#include int __timer_gettime64 (timer_t timerid, struct __itimerspec64 *value) diff --git a/sysdeps/unix/sysv/linux/timer_routines.c b/sysdeps/unix/sysv/linux/timer_routines.c index 8d8c1a1e76..fc3aa894ab 100644 --- a/sysdeps/unix/sysv/linux/timer_routines.c +++ b/sysdeps/unix/sysv/linux/timer_routines.c @@ -22,7 +22,7 @@ #include #include #include -#include "kernel-posix-timers.h" +#include /* List of active SIGEV_THREAD timers. */ diff --git a/sysdeps/unix/sysv/linux/timer_settime.c b/sysdeps/unix/sysv/linux/timer_settime.c index f8bb16a4c2..b8326e36a4 100644 --- a/sysdeps/unix/sysv/linux/timer_settime.c +++ b/sysdeps/unix/sysv/linux/timer_settime.c @@ -21,7 +21,7 @@ #include #include #include -#include "kernel-posix-timers.h" +#include int __timer_settime64 (timer_t timerid, int flags, diff --git a/sysdeps/unix/sysv/linux/x86_64/64/kernel-posix-timers.h b/sysdeps/unix/sysv/linux/x86_64/64/kernel-posix-timers.h new file mode 100644 index 0000000000..db0beb5920 --- /dev/null +++ b/sysdeps/unix/sysv/linux/x86_64/64/kernel-posix-timers.h @@ -0,0 +1,22 @@ +/* POSIX timers support functionality. x86_64 version. + Copyright (C) 2021 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. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; see the file COPYING.LIB. If + not, see . */ + +#include + +#undef TIMER_T_WAS_INT_COMPAT +#define TIMER_T_WAS_INT_COMPAT 1 diff --git a/sysdeps/unix/sysv/linux/x86_64/timer_gettime.c b/sysdeps/unix/sysv/linux/x86_64/timer_gettime.c index 3f3ae12d6b..107b1f97c7 100644 --- a/sysdeps/unix/sysv/linux/x86_64/timer_gettime.c +++ b/sysdeps/unix/sysv/linux/x86_64/timer_gettime.c @@ -18,7 +18,7 @@ #include #include -#include "kernel-posix-timers.h" +#include #include "compat-timer.h" int diff --git a/sysdeps/unix/sysv/linux/x86_64/timer_settime.c b/sysdeps/unix/sysv/linux/x86_64/timer_settime.c index 14a05965a3..f987cd16d3 100644 --- a/sysdeps/unix/sysv/linux/x86_64/timer_settime.c +++ b/sysdeps/unix/sysv/linux/x86_64/timer_settime.c @@ -18,7 +18,7 @@ #include #include -#include "kernel-posix-timers.h" +#include #include "compat-timer.h" int