From patchwork Wed Oct 19 22:14:10 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Adhemerval Zanella Netto X-Patchwork-Id: 59098 Return-Path: X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 6CD78385DC1F for ; Wed, 19 Oct 2022 22:17:07 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 6CD78385DC1F DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1666217827; bh=40CVLB+eXEIWG4vaLsKJ4S6N2Q+d1kOvrVWRLD1vU+I=; h=To:Subject:Date:In-Reply-To:References:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To: From; b=c4XpxTs9OT6IcIaOYGnB8E1evsrGmmyiiLbf9X901UWjF9N+FfQKi/C1AAQg+STaI NwUdGZODrsyFtJLJDC69PN5UQxwxiRPMSxddEu95YM7slQb8O3xdQjrS+Lmdfuc6wA 4svDUn5/jAVL68ZftOyFTvDKt1INIw81/koLPz7M= X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from mail-oa1-x32.google.com (mail-oa1-x32.google.com [IPv6:2001:4860:4864:20::32]) by sourceware.org (Postfix) with ESMTPS id 23D843858400 for ; Wed, 19 Oct 2022 22:14:48 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 23D843858400 Received: by mail-oa1-x32.google.com with SMTP id 586e51a60fabf-1326637be6eso22369748fac.13 for ; Wed, 19 Oct 2022 15:14:48 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=40CVLB+eXEIWG4vaLsKJ4S6N2Q+d1kOvrVWRLD1vU+I=; b=m5jWEaHP6J2zJbn35+5R04DnEIJuYN/sIwYx3MiX7mD7YCM46SfN83SBFNGPtSuY0v gOimKauIYekOpVFZhvMnyKLm+/my+YJptfzCrPdqMGw1PVNxCOr8BZT2hGi9lFLuz/he Vim4mt6VHgdNgjnTLbYqvtdC0mxNp/f+d+43Ib/6dFZM1opBVQoFr2v/Ay/syShz+315 o54q6DEUCb7eycapbVaibvC9lOYvvHOi6s/8yJ82I9s3hfIrctfA61AwMtxJKIpo7mGq jotybwCgo9xG8XWG7+mV/ZN6f50r/oSTAs2pYiyvJGowqNtALi7/f1EAufH/4ao7Hn3G CZNw== X-Gm-Message-State: ACrzQf3Fq/4I7lU0UPmqewpAREmzDvy5mAzluzOpTQLoiYPD6tg1PrrI qtO/1G3skUJ7fH2DxH/GuYcaddUuRHTlmCEo X-Google-Smtp-Source: AMsMyM6FLc1vOVDA7W9DkmBT24CpOY/7NGBrab7YlZXLW1HRYtXgGSM6uuP4WsJ3SAtGR1ASm+SO9w== X-Received: by 2002:a05:6871:9f:b0:131:52e5:fe7b with SMTP id u31-20020a056871009f00b0013152e5fe7bmr6427491oaa.80.1666217687162; Wed, 19 Oct 2022 15:14:47 -0700 (PDT) Received: from mandiga.. ([2804:1b3:a7c3:7d19:f1c1:9fb4:472a:ab68]) by smtp.gmail.com with ESMTPSA id m9-20020aca5809000000b00353fe4fb4casm7137927oib.48.2022.10.19.15.14.46 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 19 Oct 2022 15:14:46 -0700 (PDT) To: libc-alpha@sourceware.org Subject: [PATCH 07/30] Linux: consolidate inotify_init implementation Date: Wed, 19 Oct 2022 19:14:10 -0300 Message-Id: <20221019221433.1082017-8-adhemerval.zanella@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20221019221433.1082017-1-adhemerval.zanella@linaro.org> References: <20221019221433.1082017-1-adhemerval.zanella@linaro.org> MIME-Version: 1.0 X-Spam-Status: No, score=-12.7 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) 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: Adhemerval Zanella via Libc-alpha From: Adhemerval Zanella Netto Reply-To: Adhemerval Zanella Errors-To: libc-alpha-bounces+patchwork=sourceware.org@sourceware.org Sender: "Libc-alpha" Use inotify_init syscall if defined, otherwise use inotify_init1. Reviewed-by: Carlos O'Donell Tested-by: Carlos O'Donell --- sysdeps/unix/sysv/linux/{generic => }/inotify_init.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) rename sysdeps/unix/sysv/linux/{generic => }/inotify_init.c (78%) diff --git a/sysdeps/unix/sysv/linux/generic/inotify_init.c b/sysdeps/unix/sysv/linux/inotify_init.c similarity index 78% rename from sysdeps/unix/sysv/linux/generic/inotify_init.c rename to sysdeps/unix/sysv/linux/inotify_init.c index 3297ebc705..4da5b723a6 100644 --- a/sysdeps/unix/sysv/linux/generic/inotify_init.c +++ b/sysdeps/unix/sysv/linux/inotify_init.c @@ -1,4 +1,5 @@ -/* Copyright (C) 2011-2022 Free Software Foundation, Inc. +/* Initialize an inotify instance. Linux version. + Copyright (C) 2011-2022 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 @@ -23,6 +24,10 @@ libc_hidden_proto (inotify_init) int inotify_init (void) { - return INLINE_SYSCALL (inotify_init1, 1, 0); +#ifdef __NR_inotify_init + return INLINE_SYSCALL_CALL (inotify_init); +#else + return INLINE_SYSCALL_CALL (inotify_init1, 0); +#endif } libc_hidden_def (inotify_init)