From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 2870 invoked by alias); 24 May 2009 17:00:40 -0000 Received: (qmail 2858 invoked by uid 22791); 24 May 2009 17:00:39 -0000 X-SWARE-Spam-Status: No, hits=-2.4 required=5.0 tests=AWL,BAYES_00,SPF_PASS X-Spam-Check-By: sourceware.org Received: from mail.codesourcery.com (HELO mail.codesourcery.com) (65.74.133.4) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Sun, 24 May 2009 17:00:32 +0000 Received: (qmail 4736 invoked from network); 24 May 2009 17:00:30 -0000 Received: from unknown (HELO orlando.local) (pedro@127.0.0.2) by mail.codesourcery.com with ESMTPA; 24 May 2009 17:00:30 -0000 From: Pedro Alves To: gdb-patches@sourceware.org Subject: Re: [RFA]: handle_extended_wait: Call linux_resume_one_lwp instead of ptrace Date: Sun, 24 May 2009 17:00:00 -0000 User-Agent: KMail/1.9.10 Cc: Doug Evans References: <20090524031422.C486F846C2@localhost> In-Reply-To: <20090524031422.C486F846C2@localhost> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200905241800.42885.pedro@codesourcery.com> 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: 2009-05/txt/msg00532.txt.bz2 On Sunday 24 May 2009 04:14:22, Doug Evans wrote: > There are some things that linux_resume_one_lwp does that either > all callers of ptrace (PTRACE_CONT) should do (check errno) > or would be nice to do (print a debugging message). > I was thinking of splitting linux_resume_one_lwp into two, > but since the newly created thread is, well, new the rest of > linux_resume_one_lwp is a nop; so it seems reasonable to just call > linux_resume_one_lwp for the new thread. > It's also nice to have all calls to ptrace (PTRACE_CONT) > routed through one function. Agreed. It doesn't look like there are extra syscalls and it's all O(1) in that fast path. > > Ok to check in? > [tested on amd64 w/ --target_board=native-gdbserver, no regressions] > > 2009-05-23 Doug Evans > > * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp > to resume the newly created thread, don't call ptrace (PTRACE_CONT) > directly. Ok. -- Pedro Alves