From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 22847 invoked by alias); 25 Jun 2008 17:49:05 -0000 Received: (qmail 22836 invoked by uid 22791); 25 Jun 2008 17:49:04 -0000 X-Spam-Check-By: sourceware.org Received: from main.gmane.org (HELO ciao.gmane.org) (80.91.229.2) by sourceware.org (qpsmtpd/0.31) with ESMTP; Wed, 25 Jun 2008 17:48:35 +0000 Received: from list by ciao.gmane.org with local (Exim 4.43) id 1KBZ6a-0008Sw-BM for gdb-patches@sources.redhat.com; Wed, 25 Jun 2008 17:48:28 +0000 Received: from 78.158.192.230 ([78.158.192.230]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 25 Jun 2008 17:48:28 +0000 Received: from vladimir by 78.158.192.230 with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 25 Jun 2008 17:48:28 +0000 To: gdb-patches@sources.redhat.com From: Vladimir Prus Subject: Re: [non-stop] 01/10 Add "executing" property Date: Wed, 25 Jun 2008 19:02:00 -0000 Message-ID: References: <200806152203.14626.pedro@codesourcery.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8Bit User-Agent: KNode/0.10.9 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: 2008-06/txt/msg00444.txt.bz2 Pedro Alves wrote: > + > +/* Reports if thread PTID is executing.  */ > +extern int is_executing (ptid_t ptid); I know if follows is_running, introduced by me, but I think this is not the best interface. Say, somewhere later in this patch series we have this function: static int proceed_thread_callback (struct thread_info *thread, void *arg) { if (!is_stopped (thread->ptid)) .... Here, we already have thread_info, and using ptid to search for thread again, and get its state seems not nice. How about: extern int is_executing (struct thread_info *thread); extern int is_executing_ptid (ptid_t ptid); and a similar change for is_running? - Volodya