Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/811219/?format=api
{ "id": 811219, "url": "http://patchwork.ozlabs.org/api/patches/811219/?format=api", "web_url": "http://patchwork.ozlabs.org/project/glibc/patch/20170907224219.12483-22-albert.aribaud@3adev.fr/", "project": { "id": 41, "url": "http://patchwork.ozlabs.org/api/projects/41/?format=api", "name": "GNU C Library", "link_name": "glibc", "list_id": "libc-alpha.sourceware.org", "list_email": "libc-alpha@sourceware.org", "web_url": "", "scm_url": "", "webscm_url": "", "list_archive_url": "", "list_archive_url_format": "", "commit_url_format": "" }, "msgid": "<20170907224219.12483-22-albert.aribaud@3adev.fr>", "list_archive_url": null, "date": "2017-09-07T22:41:48", "name": "[RFC,21/52] Y2038: add function __timerfd_gettime64", "commit_ref": null, "pull_url": null, "state": "new", "archived": false, "hash": "dbd155166207f498fa526e3f736b7bb7645f8aeb", "submitter": { "id": 65557, "url": "http://patchwork.ozlabs.org/api/people/65557/?format=api", "name": "Albert ARIBAUD (3ADEV)", "email": "albert.aribaud@3adev.fr" }, "delegate": null, "mbox": "http://patchwork.ozlabs.org/project/glibc/patch/20170907224219.12483-22-albert.aribaud@3adev.fr/mbox/", "series": [ { "id": 2074, "url": "http://patchwork.ozlabs.org/api/series/2074/?format=api", "web_url": "http://patchwork.ozlabs.org/project/glibc/list/?series=2074", "date": "2017-09-07T22:41:27", "name": "Make GLIBC Y2038-proof", "version": 1, "mbox": "http://patchwork.ozlabs.org/series/2074/mbox/" } ], "comments": "http://patchwork.ozlabs.org/api/patches/811219/comments/", "check": "pending", "checks": "http://patchwork.ozlabs.org/api/patches/811219/checks/", "tags": {}, "related": [], "headers": { "Return-Path": "<libc-alpha-return-84339-incoming=patchwork.ozlabs.org@sourceware.org>", "X-Original-To": "incoming@patchwork.ozlabs.org", "Delivered-To": [ "patchwork-incoming@bilbo.ozlabs.org", "mailing list libc-alpha@sourceware.org" ], "Authentication-Results": [ "ozlabs.org;\n\tspf=pass (mailfrom) smtp.mailfrom=sourceware.org\n\t(client-ip=209.132.180.131; helo=sourceware.org;\n\tenvelope-from=libc-alpha-return-84339-incoming=patchwork.ozlabs.org@sourceware.org;\n\treceiver=<UNKNOWN>)", "ozlabs.org; dkim=pass (1024-bit key;\n\tsecure) header.d=sourceware.org header.i=@sourceware.org\n\theader.b=\"WvCYi1E+\"; dkim-atps=neutral", "sourceware.org; auth=none" ], "Received": [ "from sourceware.org (server1.sourceware.org [209.132.180.131])\n\t(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256\n\tbits)) (No client certificate requested)\n\tby ozlabs.org (Postfix) with ESMTPS id 3xpFtf0PbHz9sDB\n\tfor <incoming@patchwork.ozlabs.org>;\n\tFri, 8 Sep 2017 08:46:33 +1000 (AEST)", "(qmail 79877 invoked by alias); 7 Sep 2017 22:43:59 -0000", "(qmail 79797 invoked by uid 89); 7 Sep 2017 22:43:59 -0000" ], "DomainKey-Signature": "a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id\n\t:list-unsubscribe:list-subscribe:list-archive:list-post\n\t:list-help:sender:from:to:cc:subject:date:message-id:in-reply-to\n\t:references; q=dns; s=default; b=Pd2pdoEzX6kVE1eANS8/OraqTCnYNCV\n\t0zEv5BZjxTq7Tppz7lmi8iSlVhb+ESIBlRSX5qEqPl/H1x0vDfiDBkAIlcUydLAz\n\tSuE0OO0dzwAh8owhLNokCGEYmS+UQ9a95vX/jPA2sBJxVzGvotVIZTLnVKf9ByPV\n\tWLI8JlzqOR+8=", "DKIM-Signature": "v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id\n\t:list-unsubscribe:list-subscribe:list-archive:list-post\n\t:list-help:sender:from:to:cc:subject:date:message-id:in-reply-to\n\t:references; s=default; bh=fncMedHS0hOsKy7akWrGpKWCnIk=; b=WvCYi\n\t1E+OsBY/1A3nmktUN22vRUp0qFEKPdyEs6l5V6bomFvItM3TMwr0LJ1bJeBVBMiK\n\twK8L/NjzJK3LhliciJGE6yLXVs83J/A8dhOWnyTmELV7JJDfF5MLqWT7Zaf1KBv3\n\tAcz1mzom0AoCy/HXpxbPC7zWuHyvSPNuRYkSWU=", "Mailing-List": "contact libc-alpha-help@sourceware.org; run by ezmlm", "Precedence": "bulk", "List-Id": "<libc-alpha.sourceware.org>", "List-Unsubscribe": "<mailto:libc-alpha-unsubscribe-incoming=patchwork.ozlabs.org@sourceware.org>", "List-Subscribe": "<mailto:libc-alpha-subscribe@sourceware.org>", "List-Archive": "<http://sourceware.org/ml/libc-alpha/>", "List-Post": "<mailto:libc-alpha@sourceware.org>", "List-Help": "<mailto:libc-alpha-help@sourceware.org>,\n\t<http://sourceware.org/ml/#faqs>", "Sender": "libc-alpha-owner@sourceware.org", "X-Virus-Found": "No", "X-Spam-SWARE-Status": "No, score=-26.6 required=5.0 tests=BAYES_00, GIT_PATCH_0,\n\tGIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3,\n\tKAM_LAZY_DOMAIN_SECURITY,\n\tRCVD_IN_DNSWL_LOW autolearn=ham version=3.3.2 spammy=", "X-HELO": "smtp6-g21.free.fr", "From": "\"Albert ARIBAUD (3ADEV)\" <albert.aribaud@3adev.fr>", "To": "libc-alpha@sourceware.org", "Cc": "\"Albert ARIBAUD (3ADEV)\" <albert.aribaud@3adev.fr>", "Subject": "[RFC PATCH 21/52] Y2038: add function __timerfd_gettime64", "Date": "Fri, 8 Sep 2017 00:41:48 +0200", "Message-Id": "<20170907224219.12483-22-albert.aribaud@3adev.fr>", "In-Reply-To": "<20170907224219.12483-21-albert.aribaud@3adev.fr>", "References": "<20170907224219.12483-1-albert.aribaud@3adev.fr>\n\t<20170907224219.12483-2-albert.aribaud@3adev.fr>\n\t<20170907224219.12483-3-albert.aribaud@3adev.fr>\n\t<20170907224219.12483-4-albert.aribaud@3adev.fr>\n\t<20170907224219.12483-5-albert.aribaud@3adev.fr>\n\t<20170907224219.12483-6-albert.aribaud@3adev.fr>\n\t<20170907224219.12483-7-albert.aribaud@3adev.fr>\n\t<20170907224219.12483-8-albert.aribaud@3adev.fr>\n\t<20170907224219.12483-9-albert.aribaud@3adev.fr>\n\t<20170907224219.12483-10-albert.aribaud@3adev.fr>\n\t<20170907224219.12483-11-albert.aribaud@3adev.fr>\n\t<20170907224219.12483-12-albert.aribaud@3adev.fr>\n\t<20170907224219.12483-13-albert.aribaud@3adev.fr>\n\t<20170907224219.12483-14-albert.aribaud@3adev.fr>\n\t<20170907224219.12483-15-albert.aribaud@3adev.fr>\n\t<20170907224219.12483-16-albert.aribaud@3adev.fr>\n\t<20170907224219.12483-17-albert.aribaud@3adev.fr>\n\t<20170907224219.12483-18-albert.aribaud@3adev.fr>\n\t<20170907224219.12483-19-albert.aribaud@3adev.fr>\n\t<20170907224219.12483-20-albert.aribaud@3adev.fr>\n\t<20170907224219.12483-21-albert.aribaud@3adev.fr>" }, "content": "Note: this tests the return value of function __y2038_kernel_support()\nrather than the value of variable __y2038_linux_upport, because the\nlatter cannot be accessed from librt while the former can.\n\nSigned-off-by: Albert ARIBAUD (3ADEV) <albert.aribaud@3adev.fr>\n---\n rt/Makefile | 3 +-\n rt/Versions | 1 +\n rt/timerfd_gettime64.c | 28 ++++++++++++++++++\n sysdeps/unix/sysv/linux/timerfd_gettime64.c | 44 +++++++++++++++++++++++++++++\n 4 files changed, 75 insertions(+), 1 deletion(-)\n create mode 100644 rt/timerfd_gettime64.c\n create mode 100644 sysdeps/unix/sysv/linux/timerfd_gettime64.c", "diff": "diff --git a/rt/Makefile b/rt/Makefile\nindex 9740dc2ad8..56bfb856ae 100644\n--- a/rt/Makefile\n+++ b/rt/Makefile\n@@ -32,7 +32,8 @@ clock-routines := get_clockfreq clock_getcpuclockid\t\t\t\\\n \t\t clock_getres clock_gettime clock_settime\t\t\\\n \t\t clock_nanosleep\n timer-routines := timer_create timer_delete timer_getoverr\t\t\\\n-\t\t timer_gettime timer_settime\n+\t\t timer_gettime timer_settime \\\n+\t\t timerfd_gettime64\n shm-routines := shm_open shm_unlink\n mq-routines := mq_open mq_close mq_unlink mq_getattr mq_setattr\t\\\n \t\t mq_notify mq_send mq_receive mq_timedsend\t\t\\\ndiff --git a/rt/Versions b/rt/Versions\nindex 4933197aa5..254e36dd2d 100644\n--- a/rt/Versions\n+++ b/rt/Versions\n@@ -44,5 +44,6 @@ librt {\n GLIBC_Y2038 {\n __timer_gettime64;\n __timer_settime64;\n+ __timerfd_gettime64;\n }\n }\ndiff --git a/rt/timerfd_gettime64.c b/rt/timerfd_gettime64.c\nnew file mode 100644\nindex 0000000000..9496fcaef0\n--- /dev/null\n+++ b/rt/timerfd_gettime64.c\n@@ -0,0 +1,28 @@\n+/* Copyright (C) 1999-2016 Free Software Foundation, Inc.\n+ This file is part of the GNU C Library.\n+\n+ The GNU C Library is free software; you can redistribute it and/or\n+ modify it under the terms of the GNU Lesser General Public\n+ License as published by the Free Software Foundation; either\n+ version 2.1 of the License, or (at your option) any later version.\n+\n+ The GNU C Library is distributed in the hope that it will be useful,\n+ but WITHOUT ANY WARRANTY; without even the implied warranty of\n+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU\n+ Lesser General Public License for more details.\n+\n+ You should have received a copy of the GNU Lesser General Public\n+ License along with the GNU C Library; if not, see\n+ <http://www.gnu.org/licenses/>. */\n+\n+#include <errno.h>\n+#include <time.h>\n+\n+/* Get current value of timer TIMERID and store it in VLAUE. */\n+int\n+__timerfd_gettime64 (int fd, struct itimerspec *value)\n+{\n+ __set_errno (ENOSYS);\n+ return -1;\n+}\n+stub_warning (__timerfd_gettime64)\ndiff --git a/sysdeps/unix/sysv/linux/timerfd_gettime64.c b/sysdeps/unix/sysv/linux/timerfd_gettime64.c\nnew file mode 100644\nindex 0000000000..5843e23c8b\n--- /dev/null\n+++ b/sysdeps/unix/sysv/linux/timerfd_gettime64.c\n@@ -0,0 +1,44 @@\n+/* Copyright (C) 2003-2016 Free Software Foundation, Inc.\n+ This file is part of the GNU C Library.\n+ Contributed by Ulrich Drepper <drepper@redhat.com>, 2003.\n+\n+ The GNU C Library is free software; you can redistribute it and/or\n+ modify it under the terms of the GNU Lesser General Public License as\n+ published by the Free Software Foundation; either version 2.1 of the\n+ License, or (at your option) any later version.\n+\n+ The GNU C Library is distributed in the hope that it will be useful,\n+ but WITHOUT ANY WARRANTY; without even the implied warranty of\n+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU\n+ Lesser General Public License for more details.\n+\n+ You should have received a copy of the GNU Lesser General Public\n+ License along with the GNU C Library; see the file COPYING.LIB. If\n+ not, see <http://www.gnu.org/licenses/>. */\n+\n+#include <errno.h>\n+#include <stdlib.h>\n+#include <time.h>\n+#include <sysdep.h>\n+#include \"kernel-posix-timers.h\"\n+\n+int\n+__timerfd_gettime64 (int fd, struct __itimerspec64 *value)\n+{\n+ struct itimerspec value32;\n+\n+ if (__y2038_kernel_support())\n+ return INLINE_SYSCALL (timerfd_gettime64, 2, fd, value);\n+\n+ int res = INLINE_SYSCALL (timerfd_gettime, 2, fd, &value32);\n+\n+ if (res == 0)\n+ {\n+ value->it_value.tv_sec = value32.it_value.tv_sec;\n+ value->it_value.tv_nsec = value32.it_value.tv_nsec;\n+ value->it_interval.tv_sec = value32.it_interval.tv_sec;\n+ value->it_interval.tv_nsec = value32.it_interval.tv_nsec;\n+ }\n+\n+ return res;\n+}\n", "prefixes": [ "RFC", "21/52" ] }