From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: AS17314 8.43.84.0/22 X-Spam-Status: No, score=-4.3 required=3.0 tests=AWL,BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI,SPF_HELO_PASS,SPF_PASS shortcircuit=no autolearn=ham autolearn_force=no version=3.4.2 Received: from sourceware.org (server2.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 dcvr.yhbt.net (Postfix) with ESMTPS id 009CA1F4DA for ; Wed, 19 Oct 2022 22:16:16 +0000 (UTC) Authentication-Results: dcvr.yhbt.net; dkim=pass (1024-bit key; secure) header.d=sourceware.org header.i=@sourceware.org header.b="f/Gy0Ukj"; dkim-atps=neutral Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 2A1563856251 for ; Wed, 19 Oct 2022 22:16:15 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 2A1563856251 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1666217775; bh=OjELyAtioKsqYmKe5p1cAuCgAkWm7yKZsOkUPkVVZc0=; 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=f/Gy0UkjrbOkYSjfFXx5iSVZfyT24t+VgRa6nokraVFzPE/qf0QS1LcKXbVUMpBy1 x9ZBcRJhbEydsodwICqIXEAaEb3UKwFZQA1/BAEz5cijIB9mDgzs2Hg8TCTrltVTmJ bY1xJliF10pxVe4CeZC7khxd6fazRaQbfTAkOh0I= Received: from mail-oi1-x232.google.com (mail-oi1-x232.google.com [IPv6:2607:f8b0:4864:20::232]) by sourceware.org (Postfix) with ESMTPS id EFA3E3858286 for ; Wed, 19 Oct 2022 22:14:46 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org EFA3E3858286 Received: by mail-oi1-x232.google.com with SMTP id p127so20212480oih.9 for ; Wed, 19 Oct 2022 15:14:46 -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=OjELyAtioKsqYmKe5p1cAuCgAkWm7yKZsOkUPkVVZc0=; b=GlYWDx8xAaB9eo5RusCAPdAXmxpAPxXCHVe0ZgxvbHDybs3NqfocHnfBUlVCsCj562 BluVEvJbYX3Z/G530sPGRKMxA/QEtTp+4hSXiVo3utI/jEnhoVVM1X7IvpuunJIWFlnC hKZ4e+q0ALW0x5f+X9JVXHnZEKUM/DMRfYoY77+v6wcRFrI8iDzZ44Uc7FcEvh3i7BhW KwYtev9rKT4QPC0WnHgJTWdbDmB5ol+gU1N8UI9jVkQ2zMFzJUZNRZcWJGs+uARqSlJW BtyWEbYeLrpQD9NgHTc7tJ+VCOLHzN93wIh14MNVtaXizy+3KdzCsPnFC7mJgbf4rXgi RU7A== X-Gm-Message-State: ACrzQf2BRIeJ3e2VNSWnRN2eNpAKw7pzgyG445LGOads7i8S8Clr+gVa zkpZVm4MzjZAFr+B4tq76TNdTiRynBW0ARcu X-Google-Smtp-Source: AMsMyM5p4Edzfb+lotheZcmj2g0J1rBwrhQkIfXh4/GK/k/0NxuJWFmKZwU97OMpI7reqBdk1McXGw== X-Received: by 2002:a05:6808:1408:b0:355:2101:e28c with SMTP id w8-20020a056808140800b003552101e28cmr5689651oiv.296.1666217685881; Wed, 19 Oct 2022 15:14:45 -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.44 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 19 Oct 2022 15:14:45 -0700 (PDT) To: libc-alpha@sourceware.org Subject: [PATCH 06/30] Lninux: consolidate epoll_create implementation Date: Wed, 19 Oct 2022 19:14:09 -0300 Message-Id: <20221019221433.1082017-7-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 Content-Transfer-Encoding: 8bit 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: , From: Adhemerval Zanella via Libc-alpha Reply-To: Adhemerval Zanella Errors-To: libc-alpha-bounces+e=80x24.org@sourceware.org Sender: "Libc-alpha" Use epoll_create syscall if defined, otherwise use epoll_create1. --- sysdeps/unix/sysv/linux/{generic => }/epoll_create.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) rename sysdeps/unix/sysv/linux/{generic => }/epoll_create.c (79%) diff --git a/sysdeps/unix/sysv/linux/generic/epoll_create.c b/sysdeps/unix/sysv/linux/epoll_create.c similarity index 79% rename from sysdeps/unix/sysv/linux/generic/epoll_create.c rename to sysdeps/unix/sysv/linux/epoll_create.c index fa28694929..afb1921637 100644 --- a/sysdeps/unix/sysv/linux/generic/epoll_create.c +++ b/sysdeps/unix/sysv/linux/epoll_create.c @@ -1,4 +1,5 @@ -/* Copyright (C) 2011-2022 Free Software Foundation, Inc. +/* Open an epoll file descriptor. 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,12 +24,16 @@ libc_hidden_proto (epoll_create) int epoll_create (int size) { +#ifdef __NR_epoll_create + return INLINE_SYSCALL_CALL (epoll_create); +#else if (size <= 0) { __set_errno (EINVAL); return -1; } - return INLINE_SYSCALL (epoll_create1, 1, 0); + return INLINE_SYSCALL_CALL (epoll_create1, 0); +#endif } libc_hidden_def (epoll_create) -- 2.34.1