From owner-p4-projects@FreeBSD.ORG Mon Jun 28 05:26:02 2004 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 8E15716A4D0; Mon, 28 Jun 2004 05:26:02 +0000 (GMT) Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 6A07F16A4CE for ; Mon, 28 Jun 2004 05:26:02 +0000 (GMT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 6382E43D4C for ; Mon, 28 Jun 2004 05:26:02 +0000 (GMT) (envelope-from marcel@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.12.11/8.12.11) with ESMTP id i5S5Q2E7035806 for ; Mon, 28 Jun 2004 05:26:02 GMT (envelope-from marcel@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.12.11/8.12.11/Submit) id i5S5Q2uK035803 for perforce@freebsd.org; Mon, 28 Jun 2004 05:26:02 GMT (envelope-from marcel@freebsd.org) Date: Mon, 28 Jun 2004 05:26:02 GMT Message-Id: <200406280526.i5S5Q2uK035803@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to marcel@freebsd.org using -f From: Marcel Moolenaar To: Perforce Change Reviews Subject: PERFORCE change 55978 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 28 Jun 2004 05:26:03 -0000 http://perforce.freebsd.org/chv.cgi?CH=55978 Change 55978 by marcel@marcel_nfs on 2004/06/28 05:25:04 Change next_uniqueid to last_uniqueid and use a pre-inc instead of a post-inc. The net effect is that ids start with 2 instead of one, leaving 1 for use by the initial thread. Previously the initial thread had id 0, but that's a particularly bad id to use for GDB. Affected files ... .. //depot/projects/gdb/lib/libc_r/uthread/uthread_create.c#2 edit Differences ... ==== //depot/projects/gdb/lib/libc_r/uthread/uthread_create.c#2 (text+ko) ==== @@ -46,7 +46,7 @@ #include "pthread_private.h" #include "libc_private.h" -static u_int64_t next_uniqueid = 1; +static u_int64_t last_uniqueid = 1; #define OFF(f) offsetof(struct pthread, f) int _thread_next_offset = OFF(tle.tqe_next); @@ -212,7 +212,7 @@ * Initialise the unique id which GDB uses to * track threads. */ - new_thread->uniqueid = next_uniqueid++; + new_thread->uniqueid = ++last_uniqueid; /* * Check if the garbage collector thread