From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 3439 invoked by alias); 4 Jun 2003 22:18:37 -0000 Mailing-List: contact gdb-patches-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sources.redhat.com Received: (qmail 3343 invoked from network); 4 Jun 2003 22:18:36 -0000 Received: from unknown (HELO takamaka.act-europe.fr) (209.53.17.87) by sources.redhat.com with SMTP; 4 Jun 2003 22:18:36 -0000 Received: by takamaka.act-europe.fr (Postfix, from userid 507) id 9ED26D2DAF; Wed, 4 Jun 2003 15:18:15 -0700 (PDT) Date: Wed, 04 Jun 2003 22:18:00 -0000 From: Joel Brobecker To: gdb-patches@sources.redhat.com Subject: A couple of comments about the nptl patch (minor) Message-ID: <20030604221815.GS926@gnat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.4i X-SW-Source: 2003-06/txt/msg00187.txt.bz2 Hello, I'm reading Jeff's patch regarding support for NPTL, and have a couple of comments/questions... It's really minor... > static int tkill_failed; This could be moved inside kill_lwp. Something like the following. I would also explicitely set it to zero but this is maybe already guaranteed by the language? > #ifdef HAVE_TKILL_SYSCALL > if (!tkill_failed) > { static int tkill_failed = 0; > int ret = syscall (__NR_tkill, lwpid, signo); > if (errno != ENOSYS) > return ret; > errno = 0; > tkill_failed = 1; > } > #endif In stop_callback, the gdb_assert for ret to be zero after the call to kill (or kill_lwp) has been removed. I suppose it is valid for syscall to return nonzero values ? In that case, is it still necessary to keep this local variable? > /* Send a SIGSTOP to LP. */ > > static int > stop_callback (struct lwp_info *lp, void *data) > { > if (!lp->stopped && !lp->signalled) > { > int ret; [...] > ret = kill_lwp (GET_LWP (lp->ptid), SIGSTOP); [...] > } -- Joel