From patchwork Sun Feb 24 16:51:50 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tom Tromey X-Patchwork-Id: 31586 Received: (qmail 115175 invoked by alias); 24 Feb 2019 16:52:09 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Delivered-To: mailing list gdb-patches@sourceware.org Received: (qmail 114831 invoked by uid 89); 24 Feb 2019 16:52:07 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-26.9 required=5.0 tests=BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, RCVD_IN_DNSWL_NONE, SPF_HELO_PASS autolearn=ham version=3.3.2 spammy=duty, Hx-languages-length:1919, Event, serviced X-HELO: gateway36.websitewelcome.com Received: from gateway36.websitewelcome.com (HELO gateway36.websitewelcome.com) (192.185.187.5) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Sun, 24 Feb 2019 16:52:04 +0000 Received: from cm17.websitewelcome.com (cm17.websitewelcome.com [100.42.49.20]) by gateway36.websitewelcome.com (Postfix) with ESMTP id AA80A400D5147 for ; Sun, 24 Feb 2019 10:06:50 -0600 (CST) Received: from box5379.bluehost.com ([162.241.216.53]) by cmsmtp with SMTP id xx0Rgo2jU90onxx0Rg9An5; Sun, 24 Feb 2019 10:51:59 -0600 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=tromey.com; s=default; h=References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From: Sender:Reply-To:MIME-Version:Content-Type:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=J9DC0doAXuA4zWob9zoOta97mWREDA4W6ZCdhWhuFc8=; b=b243tAkpt22XQ6MWBbs44woE61 0VJKU5I9SJcPP3XoUbFAqHRO+PNRxJ/icWXxvMGCpOfPEiF58/fOea94oZlD/o/DOXPBy30h6zr2Q YyQzNE/iZUk0mjabMLq9btQuM; Received: from 75-166-72-210.hlrn.qwest.net ([75.166.72.210]:44502 helo=bapiya.Home) by box5379.bluehost.com with esmtpsa (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.91) (envelope-from ) id 1gxx0R-001AKk-8p; Sun, 24 Feb 2019 10:51:59 -0600 From: Tom Tromey To: gdb-patches@sourceware.org Cc: Tom Tromey Subject: [RFC 14/17] Remove some dead code from event-loop.c Date: Sun, 24 Feb 2019 09:51:50 -0700 Message-Id: <20190224165153.5062-15-tom@tromey.com> In-Reply-To: <20190224165153.5062-1-tom@tromey.com> References: <20190224165153.5062-1-tom@tromey.com> This removes some dead code from event-loop.c. gdb/ChangeLog 2019-02-24 Tom Tromey * common/event-loop.c (event_data, gdb_event, event_handler_func): Remove. --- gdb/ChangeLog | 5 +++++ gdb/common/event-loop.c | 33 --------------------------------- 2 files changed, 5 insertions(+), 33 deletions(-) diff --git a/gdb/common/event-loop.c b/gdb/common/event-loop.c index b8d5b007163..62de430f067 100644 --- a/gdb/common/event-loop.c +++ b/gdb/common/event-loop.c @@ -41,39 +41,6 @@ #define GDB_WRITABLE (1<<2) #define GDB_EXCEPTION (1<<3) -/* Data point to pass to the event handler. */ -typedef union event_data -{ - void *ptr; - int integer; -} event_data; - -typedef struct gdb_event gdb_event; -typedef void (event_handler_func) (event_data); - -/* Event for the GDB event system. Events are queued by calling - async_queue_event and serviced later on by gdb_do_one_event. An - event can be, for instance, a file descriptor becoming ready to be - read. Servicing an event simply means that the procedure PROC will - be called. We have 2 queues, one for file handlers that we listen - to in the event loop, and one for the file handlers+events that are - ready. The procedure PROC associated with each event is dependant - of the event source. In the case of monitored file descriptors, it - is always the same (handle_file_event). Its duty is to invoke the - handler associated with the file descriptor whose state change - generated the event, plus doing other cleanups and such. In the - case of async signal handlers, it is - invoke_async_signal_handler. */ - -typedef struct gdb_event - { - /* Procedure to call to service this event. */ - event_handler_func *proc; - - /* Data to pass to the event handler. */ - event_data data; - } *gdb_event_p; - /* Information about each file descriptor we register with the event loop. */