From patchwork Thu Jun 19 05:50:35 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yao Qi X-Patchwork-Id: 1565 Received: (qmail 28733 invoked by alias); 19 Jun 2014 05:52:36 -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 28718 invoked by uid 89); 19 Jun 2014 05:52:36 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.7 required=5.0 tests=AWL, BAYES_00 autolearn=ham version=3.3.2 X-HELO: relay1.mentorg.com Received: from relay1.mentorg.com (HELO relay1.mentorg.com) (192.94.38.131) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Thu, 19 Jun 2014 05:52:35 +0000 Received: from svr-orw-fem-01.mgc.mentorg.com ([147.34.98.93]) by relay1.mentorg.com with esmtp id 1WxVGy-0006r9-07 from Yao_Qi@mentor.com for gdb-patches@sourceware.org; Wed, 18 Jun 2014 22:52:32 -0700 Received: from SVR-ORW-FEM-04.mgc.mentorg.com ([147.34.97.41]) by svr-orw-fem-01.mgc.mentorg.com over TLS secured channel with Microsoft SMTPSVC(6.0.3790.4675); Wed, 18 Jun 2014 22:52:31 -0700 Received: from qiyao.dyndns.org.com (147.34.91.1) by svr-orw-fem-04.mgc.mentorg.com (147.34.97.41) with Microsoft SMTP Server id 14.2.247.3; Wed, 18 Jun 2014 22:52:26 -0700 From: Yao Qi To: Subject: [PATCH OBV] Remove any_running Date: Thu, 19 Jun 2014 13:50:35 +0800 Message-ID: <1403157035-13558-1-git-send-email-yao@codesourcery.com> MIME-Version: 1.0 X-IsSubscribed: yes Function any_running isn't used. This patch is to remove it. Rebuild GDB for linux and mingw. gdb: 2014-06-19 Yao Qi * gdbthread.h (any_running): Remove the declaration. * thread.c (any_running): Remove. --- gdb/gdbthread.h | 3 --- gdb/thread.c | 12 ------------ 2 files changed, 15 deletions(-) diff --git a/gdb/gdbthread.h b/gdb/gdbthread.h index 1f10469..689fe9e 100644 --- a/gdb/gdbthread.h +++ b/gdb/gdbthread.h @@ -361,9 +361,6 @@ extern int is_exited (ptid_t ptid); /* In the frontend's perpective, is this thread stopped? */ extern int is_stopped (ptid_t ptid); -/* In the frontend's perpective is there any thread running? */ -extern int any_running (void); - /* Marks thread PTID as executing, or not. If ptid_get_pid (PTID) is -1, marks all threads. diff --git a/gdb/thread.c b/gdb/thread.c index 7bc5271..0c40b80 100644 --- a/gdb/thread.c +++ b/gdb/thread.c @@ -648,18 +648,6 @@ is_running (ptid_t ptid) } int -any_running (void) -{ - struct thread_info *tp; - - for (tp = thread_list; tp; tp = tp->next) - if (tp->state == THREAD_RUNNING) - return 1; - - return 0; -} - -int is_executing (ptid_t ptid) { struct thread_info *tp;