From patchwork Fri Dec 13 02:25:18 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Samuel Thibault X-Patchwork-Id: 1208938 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=209.132.180.131; helo=sourceware.org; envelope-from=libc-alpha-return-108039-incoming=patchwork.ozlabs.org@sourceware.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=ens-lyon.org Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; secure) header.d=sourceware.org header.i=@sourceware.org header.b="KhVS/IrF"; dkim-atps=neutral Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 47YvfW0rvGz9sPL for ; Fri, 13 Dec 2019 13:25:54 +1100 (AEDT) DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; q=dns; s= default; b=pIz4S5dZCvJ/vzFjBuW+NEIuzvFhwekCA13wCRXuIWsGDJboYYuqM fr4yATuFb+oLvbYLdjN5lX3Ho1prbJT+OXvIfB4X+gBxFmciRapFHRL3djtQL42S bxmyJ9usxZD0hmKpI6fwzQCzFItsdZ/7Z73AED0Ji25C4QWWTK7cVM= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; s=default; bh=IHHEMF3XBiAk8m2DITLI/hnzJyk=; b=KhVS/IrFQbIG06QqHF3Ji55GUDr/ e6PQ2sMhTVfvJhQIrZsHRStuYaXN5/+0YbYTlReS6HRe13cNv1MqyXGzlAroayXV MzSpgXalqjk4Xec547HetOudS4qKRUNzFebiENobkRmgDq8zahrXNEffbX3zE0ev /kutlv+K+XNhRHs= Received: (qmail 123896 invoked by alias); 13 Dec 2019 02:25:30 -0000 Mailing-List: contact libc-alpha-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: libc-alpha-owner@sourceware.org Delivered-To: mailing list libc-alpha@sourceware.org Received: (qmail 123813 invoked by uid 89); 13 Dec 2019 02:25:30 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-26.1 required=5.0 tests=BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, KAM_SHORT, RCVD_IN_DNSWL_NONE, SPF_HELO_PASS, SPF_NEUTRAL autolearn=ham version=3.3.1 spammy=drepper, Drepper, HContent-Transfer-Encoding:8bit X-HELO: hera.aquilenet.fr From: Samuel Thibault To: libc-alpha@sourceware.org Cc: Samuel Thibault , commit-hurd@gnu.org Subject: [hurd,commited 1/2] hurd: Implement __close_nocancel_nostatus Date: Fri, 13 Dec 2019 03:25:18 +0100 Message-Id: <20191213022519.164161-3-samuel.thibault@ens-lyon.org> In-Reply-To: <20191213022519.164161-1-samuel.thibault@ens-lyon.org> References: <20191213022519.164161-1-samuel.thibault@ens-lyon.org> MIME-Version: 1.0 * sysdeps/mach/hurd/not-cancel.h: New file. --- sysdeps/mach/hurd/not-cancel.h | 62 ++++++++++++++++++++++++++++++++++ 1 file changed, 62 insertions(+) create mode 100644 sysdeps/mach/hurd/not-cancel.h diff --git a/sysdeps/mach/hurd/not-cancel.h b/sysdeps/mach/hurd/not-cancel.h new file mode 100644 index 0000000000..b78870a5b7 --- /dev/null +++ b/sysdeps/mach/hurd/not-cancel.h @@ -0,0 +1,62 @@ +/* Uncancelable versions of cancelable interfaces. Hurd version. + Copyright (C) 2003-2019 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Ulrich Drepper , 2003. + + 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; if not, see + . */ + +#ifndef NOT_CANCEL_H +# define NOT_CANCEL_H + +#include +#include +#include +#include +#include +#include +#include + +/* For now we have none. Map the name to the normal functions. */ +#define __open_nocancel(...) \ + __open (__VA_ARGS__) +#define __open64_nocancel(...) \ + __open64 (__VA_ARGS__) +#define __openat_nocancel(...) \ + __openat (__VA_ARGS__) +#define __openat64_nocancel(...) \ + __openat64 (__VA_ARGS__) +#define __close_nocancel(fd) \ + __close (fd) + +static inline void +__close_nocancel_nostatus (int fd) +{ + HURD_FD_USE (fd, _hurd_fd_close (descriptor)); +} + +#define __read_nocancel(fd, buf, n) \ + __read (fd, buf, n) +#define __pread64_nocancel(fd, buf, count, offset) \ + __pread64 (fd, buf, count, offset) +#define __write_nocancel(fd, buf, n) \ + __write (fd, buf, n) +#define __writev_nocancel_nostatus(fd, iov, n) \ + (void) __writev (fd, iov, n) +# define __waitpid_nocancel(pid, stat_loc, options) \ + __waitpid (pid, stat_loc, options) +#define __fcntl64_nocancel(fd, cmd, ...) \ + __fcntl64 (fd, cmd, __VA_ARGS__) + +#endif /* NOT_CANCEL_H */