From patchwork Sat Apr 29 13:12:22 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sergey Bugaev X-Patchwork-Id: 1775231 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=sourceware.org (client-ip=2620:52:3:1:0:246e:9693:128c; helo=sourceware.org; envelope-from=libc-alpha-bounces+incoming=patchwork.ozlabs.org@sourceware.org; receiver=) Authentication-Results: legolas.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=iBojbMuP; dkim-atps=neutral Received: from sourceware.org (server2.sourceware.org [IPv6:2620:52:3:1:0:246e:9693:128c]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4Q7qdr2xmQz23tq for ; Sat, 29 Apr 2023 23:12:48 +1000 (AEST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 511E33857347 for ; Sat, 29 Apr 2023 13:12:46 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 511E33857347 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1682773966; bh=/kKML+BhmELLdCyakyX7VLzfk9xsXZz+1mzdBJEWK38=; h=To:Cc:Subject:Date:In-Reply-To:References:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From:Reply-To:From; b=iBojbMuPzw8lw2/x6YIHEMp3RU7l83+MyNIPZ37jNzYjRFI9A1ay+EmscKQjhPpD+ 66bg7g/x+QE7Qbo5wHD7ugIP7IE0k4C+K+CD9kzK51JAMregN92T0tMJQ2ESaKOS7D jFv8wUUKm8BymTtIrL8zv4OxGI53diqS3Y003xDU= X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from mail-lf1-x12b.google.com (mail-lf1-x12b.google.com [IPv6:2a00:1450:4864:20::12b]) by sourceware.org (Postfix) with ESMTPS id E62973858C54 for ; Sat, 29 Apr 2023 13:12:27 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org E62973858C54 Received: by mail-lf1-x12b.google.com with SMTP id 2adb3069b0e04-4f00c33c3d6so1140676e87.2 for ; Sat, 29 Apr 2023 06:12:27 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1682773946; x=1685365946; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=/kKML+BhmELLdCyakyX7VLzfk9xsXZz+1mzdBJEWK38=; b=Mwm3I9/us4MKoxF2lkVfwB2KTVwJGBoXXcCtgdsPWKgLF4/wNb/+UVZOzWCPnLxx/K zrMEbLo8M+wJXUlQdQSzhTXXOYpFNx+gzveAXzPXOo0ywC5V6drB7gRM/4FXk6UHdrZ8 NASP8qv+Rsj3zGpHrJyACp0X/POLK+jOXH753QN2+JdLE4pdj0uCkYAE7R2AwWBxvSer 3dyFne6sngrC8n1e/z8hVP44UmlRovl/QBU0xFavMNbYlA+rHmfndrJb3f8+8hLEdZvv fUVwBlRnhKxpz23dOp8/lW/Edh1gI8oQ2hHEV/FbLuHfoZSLUFHRsliCONqXTvjWY3A7 zAFw== X-Gm-Message-State: AC+VfDy9WwhGbe6s8nChQHIOimDvsKPrGtQY8U3n7u/LlCa+oDSk0jM1 4XGKuftVFsaZTZI4TBGnS42bViR9oAxVmw== X-Google-Smtp-Source: ACHHUZ4HBDubOHpASsdxmI4ZgNyajQ17ifeBHm8DdMJDZxw8Wv9qpamjb6AoylKiYd8L/cjg5nXXOw== X-Received: by 2002:ac2:5dd2:0:b0:4ef:f06e:b6cf with SMTP id x18-20020ac25dd2000000b004eff06eb6cfmr2334307lfq.44.1682773945943; Sat, 29 Apr 2023 06:12:25 -0700 (PDT) Received: from surface-pro-6.. ([2a00:1370:818c:4a57:8a14:19ba:9e6b:1866]) by smtp.gmail.com with ESMTPSA id u21-20020a2e8455000000b002a8e8c776e9sm3736870ljh.56.2023.04.29.06.12.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 29 Apr 2023 06:12:25 -0700 (PDT) To: libc-alpha@sourceware.org Cc: bug-hurd@gnu.org, Samuel Thibault Subject: [PATCH 2/3] hurd: Mark error functions as __COLD Date: Sat, 29 Apr 2023 16:12:22 +0300 Message-Id: <20230429131223.2507236-2-bugaevc@gmail.com> X-Mailer: git-send-email 2.40.1 In-Reply-To: <20230429131223.2507236-1-bugaevc@gmail.com> References: <20230429131223.2507236-1-bugaevc@gmail.com> MIME-Version: 1.0 X-Spam-Status: No, score=-11.3 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_FROM, GIT_PATCH_0, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP, T_SCC_BODY_TEXT_LINE 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: Sergey Bugaev via Libc-alpha From: Sergey Bugaev Reply-To: Sergey Bugaev Errors-To: libc-alpha-bounces+incoming=patchwork.ozlabs.org@sourceware.org Sender: "Libc-alpha" This should hopefully hint the compiler that they are unlikely to be called. Signed-off-by: Sergey Bugaev --- hurd/hurd.h | 2 +- hurd/hurd/fd.h | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/hurd/hurd.h b/hurd/hurd.h index eca4abb7..06f00e93 100644 --- a/hurd/hurd.h +++ b/hurd/hurd.h @@ -48,7 +48,7 @@ #define _HURD_H_EXTERN_INLINE __extern_inline #endif -extern int __hurd_fail (error_t err); +extern int __hurd_fail (error_t err) __COLD; #ifdef __USE_EXTERN_INLINES _HURD_H_EXTERN_INLINE int diff --git a/hurd/hurd/fd.h b/hurd/hurd/fd.h index f6139544..241797bf 100644 --- a/hurd/hurd/fd.h +++ b/hurd/hurd/fd.h @@ -149,7 +149,7 @@ _hurd_fd_get (int fd) /* Check if ERR should generate a signal. Returns the signal to take, or zero if none. */ -extern int _hurd_fd_error_signal (error_t err); +extern int _hurd_fd_error_signal (error_t err) __COLD; #ifdef __USE_EXTERN_INLINES _HURD_FD_H_EXTERN_INLINE int @@ -174,7 +174,7 @@ _hurd_fd_error_signal (error_t err) always use this function to handle errors from RPCs made on file descriptor ports. Some errors are translated into signals. */ -extern error_t _hurd_fd_error (int fd, error_t err); +extern error_t _hurd_fd_error (int fd, error_t err) __COLD; #ifdef __USE_EXTERN_INLINES _HURD_FD_H_EXTERN_INLINE error_t @@ -194,7 +194,7 @@ _hurd_fd_error (int fd, error_t err) /* Handle error code ERR from an RPC on file descriptor FD's port. Set `errno' to the appropriate error code, and always return -1. */ -extern int __hurd_dfail (int fd, error_t err); +extern int __hurd_dfail (int fd, error_t err) __COLD; #ifdef __USE_EXTERN_INLINES _HURD_FD_H_EXTERN_INLINE int @@ -208,7 +208,7 @@ __hurd_dfail (int fd, error_t err) /* Likewise, but do not raise SIGPIPE on EPIPE if flags contain MSG_NOSIGNAL. */ -extern int __hurd_sockfail (int fd, int flags, error_t err); +extern int __hurd_sockfail (int fd, int flags, error_t err) __COLD; #ifdef __USE_EXTERN_INLINES _HURD_FD_H_EXTERN_INLINE int