From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wr1-f49.google.com (mail-wr1-f49.google.com [209.85.221.49]) by sourceware.org (Postfix) with ESMTPS id 8911B3839C78 for ; Sun, 27 Jun 2021 16:12:18 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 8911B3839C78 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=palves.net Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-wr1-f49.google.com with SMTP id a13so17476556wrf.10 for ; Sun, 27 Jun 2021 09:12:18 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:from:to:references:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=HmS4iUGE6Hvqp+s8mlT83ZqsX4UtK+k+sB/L3GVpJyU=; b=I1owU+53Y3RsSY/b5lewmfiysXKnQN4CBaCR9farvU0ZM9FyTt880B5bE8UglimA2Q ++QoKPpLwJ8AVZ20y73UMe4vS3CcxR/cpMWN238+NHH2DsvY6dqTM5ns2Mu7XMqllcBe +zdRLCp3j0JJfTepcfgKanlDw4tkywvn1yEPXoXPWZQnyC/rKUmc0lpF4K7oIvJdrnr2 m/kN3PtNzCu/7jtiZ8g+E3W03vTf2I9foUHaC3GazNXQiONCcBqt/aNNO0o/PDckN3v4 +VTaIgD5lRNd3hF7fShiuquXwXlF83I+kan0Q8Muv5Asgg7Z/0lwb3EscftSHmLxVGmk IPKw== X-Gm-Message-State: AOAM5304FJhG1bxqj/gBlrkvGKU52RYhRv0FdTNJyOuL1Ix8frAu5Uvh mN8N8Ghb3NOJTsmOIaFpqSKGaPop6xg5wA== X-Google-Smtp-Source: ABdhPJwQweRmwFNHHyQniOcp6Kk4vVQsFZTVbm+wf8g/mg4xlSUyBLjk59lcgEddY4YazpbAdy9gEQ== X-Received: by 2002:a5d:5919:: with SMTP id v25mr21802310wrd.319.1624810336945; Sun, 27 Jun 2021 09:12:16 -0700 (PDT) Received: from ?IPv6:2001:8a0:f932:6a00:6b6e:c7b6:c5a7:aac3? ([2001:8a0:f932:6a00:6b6e:c7b6:c5a7:aac3]) by smtp.gmail.com with ESMTPSA id k4sm3849075wmj.19.2021.06.27.09.12.15 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sun, 27 Jun 2021 09:12:16 -0700 (PDT) Subject: Re: [RFC PATCH 2/7] gdb linux-nat: Convert linux_nat_event_pipe to the event_pipe class. From: Pedro Alves To: John Baldwin , gdb-patches@sourceware.org References: <20210607170932.3954-1-jhb@FreeBSD.org> <20210607170932.3954-3-jhb@FreeBSD.org> Message-ID: <8865aa55-4411-252a-8ea6-034d82cc7c72@palves.net> Date: Sun, 27 Jun 2021 17:12:14 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.11.0 MIME-Version: 1.0 In-Reply-To: <20210607170932.3954-3-jhb@FreeBSD.org> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-11.0 required=5.0 tests=BAYES_00, FREEMAIL_FORGED_FROMDOMAIN, FREEMAIL_FROM, GIT_PATCH_0, HEADER_FROM_DIFFERENT_DOMAINS, KAM_DMARC_STATUS, NICE_REPLY_A, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 27 Jun 2021 16:12:19 -0000 On 2021-06-07 6:09 p.m., John Baldwin wrote: > diff --git a/gdb/linux-nat.c b/gdb/linux-nat.c > index 34a2aee41d..150fdd43f8 100644 > --- a/gdb/linux-nat.c > +++ b/gdb/linux-nat.c > @@ -48,6 +48,7 @@ > #include /* for O_RDONLY */ > #include "inf-loop.h" > #include "gdbsupport/event-loop.h" > +#include "gdbsupport/event-pipe.h" > #include "event-top.h" > #include > #include > @@ -219,24 +220,17 @@ static int report_thread_events; > > /* The read/write ends of the pipe registered as waitable file in the > event loop. */ Should we update the comment above? (Same in gdbserver.) > -static int linux_nat_event_pipe[2] = { -1, -1 }; > +static event_pipe linux_nat_event_pipe; > /* Put something (anything, doesn't matter what, or how much) in event > @@ -246,21 +240,7 @@ async_file_flush (void) > static void > async_file_mark (void) I guess the intro comment could use a little update to talk about marking the event pipe instead of talking about writing bytes?