From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 29215 invoked by alias); 21 Oct 2012 02:59:25 -0000 Received: (qmail 29063 invoked by uid 22791); 21 Oct 2012 02:59:23 -0000 X-SWARE-Spam-Status: No, hits=-4.5 required=5.0 tests=AWL,BAYES_00,KHOP_RCVD_UNTRUST,KHOP_THREADED,RCVD_IN_HOSTKARMA_W,RCVD_IN_HOSTKARMA_WL,TW_GF X-Spam-Check-By: sourceware.org Received: from relay1.mentorg.com (HELO relay1.mentorg.com) (192.94.38.131) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Sun, 21 Oct 2012 02:59:17 +0000 Received: from svr-orw-exc-10.mgc.mentorg.com ([147.34.98.58]) by relay1.mentorg.com with esmtp id 1TPlkz-0003Am-52 from Yao_Qi@mentor.com for gdb-patches@sourceware.org; Sat, 20 Oct 2012 19:59:17 -0700 Received: from SVR-ORW-FEM-05.mgc.mentorg.com ([147.34.97.43]) by SVR-ORW-EXC-10.mgc.mentorg.com with Microsoft SMTPSVC(6.0.3790.4675); Sat, 20 Oct 2012 19:59:16 -0700 Received: from qiyao.dyndns.org.com (147.34.91.1) by svr-orw-fem-05.mgc.mentorg.com (147.34.97.43) with Microsoft SMTP Server id 14.1.289.1; Sat, 20 Oct 2012 19:59:16 -0700 From: Yao Qi To: Subject: [PATCH 2/2] Remove mark_async_signal_handler_wrapper. Date: Sun, 21 Oct 2012 02:59:00 -0000 Message-ID: <1350788330-7135-3-git-send-email-yao@codesourcery.com> In-Reply-To: <1350788330-7135-1-git-send-email-yao@codesourcery.com> References: <1350788330-7135-1-git-send-email-yao@codesourcery.com> MIME-Version: 1.0 Content-Type: text/plain X-IsSubscribed: yes Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2012-10/txt/msg00375.txt.bz2 Hi, Back to year 1999~2000, the type of sigFOO_token is PTR, and mark_async_signal_handler_wrapper is to cast parameter from type PTR to 'struct async_signal_handler *'. After 2001, looks we started to eliminate PTR from source, and the type of sigFOO_toke is changed to 'void *'. After previous patch, the type is finally changed to 'struct async_signal_handler *', so the cast is not necessary anymore. This patch removes function 'mark_async_signal_handler_wrapper', and use 'mark_async_signal_handler' instead. gdb: 2012-10-21 Yao Qi * event-top.c (mark_async_signal_handler_wrapper): Remove. * event-top.h: Remove its declaration. (async_request_quit): Call mark_async_signal_handler instead of mark_async_signal_handler_wrapper. (async_do_nothing, async_disconnect): Likewise. (async_stop_sig): Likewise. * remote.c (handle_remote_sigint): Likewise. (handle_remote_sigint_twice): Likewise. --- gdb/event-top.c | 14 ++++---------- gdb/event-top.h | 1 - gdb/remote.c | 4 ++-- 3 files changed, 6 insertions(+), 13 deletions(-) diff --git a/gdb/event-top.c b/gdb/event-top.c index 1e0626a..5c533e4 100644 --- a/gdb/event-top.c +++ b/gdb/event-top.c @@ -770,12 +770,6 @@ async_init_signals (void) } -void -mark_async_signal_handler_wrapper (void *token) -{ - mark_async_signal_handler ((struct async_signal_handler *) token); -} - /* Tell the event loop what to do if SIGINT is received. See event-signal.c. */ void @@ -829,7 +823,7 @@ async_request_quit (gdb_client_data arg) static void handle_sigquit (int sig) { - mark_async_signal_handler_wrapper (sigquit_token); + mark_async_signal_handler (sigquit_token); signal (sig, handle_sigquit); } #endif @@ -850,7 +844,7 @@ async_do_nothing (gdb_client_data arg) static void handle_sighup (int sig) { - mark_async_signal_handler_wrapper (sighup_token); + mark_async_signal_handler (sighup_token); signal (sig, handle_sighup); } @@ -886,7 +880,7 @@ async_disconnect (gdb_client_data arg) void handle_stop_sig (int sig) { - mark_async_signal_handler_wrapper (sigtstp_token); + mark_async_signal_handler (sigtstp_token); signal (sig, handle_stop_sig); } @@ -926,7 +920,7 @@ async_stop_sig (gdb_client_data arg) static void handle_sigfpe (int sig) { - mark_async_signal_handler_wrapper (sigfpe_token); + mark_async_signal_handler (sigfpe_token); signal (sig, handle_sigfpe); } diff --git a/gdb/event-top.h b/gdb/event-top.h index 76a790e..76b24b8 100644 --- a/gdb/event-top.h +++ b/gdb/event-top.h @@ -46,7 +46,6 @@ extern void handle_stop_sig (int sig); extern void handle_sigint (int sig); extern void handle_sigterm (int sig); extern void gdb_readline2 (void *client_data); -extern void mark_async_signal_handler_wrapper (void *token); extern void async_request_quit (void *arg); extern void stdin_event_handler (int error, void *client_data); extern void async_disable_stdin (void); diff --git a/gdb/remote.c b/gdb/remote.c index 1409380..3786dff 100644 --- a/gdb/remote.c +++ b/gdb/remote.c @@ -4886,7 +4886,7 @@ static void handle_remote_sigint (int sig) { signal (sig, handle_remote_sigint_twice); - mark_async_signal_handler_wrapper (sigint_remote_token); + mark_async_signal_handler (sigint_remote_token); } /* Signal handler for SIGINT, installed after SIGINT has already been @@ -4896,7 +4896,7 @@ static void handle_remote_sigint_twice (int sig) { signal (sig, handle_remote_sigint); - mark_async_signal_handler_wrapper (sigint_remote_twice_token); + mark_async_signal_handler (sigint_remote_twice_token); } /* Perform the real interruption of the target execution, in response -- 1.7.7.6