From owner-p4-projects@FreeBSD.ORG Mon Jul 19 00:11:32 2004 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 6347416A4D0; Mon, 19 Jul 2004 00:11:32 +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 1FB6B16A4CE for ; Mon, 19 Jul 2004 00:11:32 +0000 (GMT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 1811943D39 for ; Mon, 19 Jul 2004 00:11:32 +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 i6J0BVLU008736 for ; Mon, 19 Jul 2004 00:11:31 GMT (envelope-from marcel@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.12.11/8.12.11/Submit) id i6J0BVpE008733 for perforce@freebsd.org; Mon, 19 Jul 2004 00:11:31 GMT (envelope-from marcel@freebsd.org) Date: Mon, 19 Jul 2004 00:11:31 GMT Message-Id: <200407190011.i6J0BVpE008733@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 57662 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, 19 Jul 2004 00:11:32 -0000 http://perforce.freebsd.org/chv.cgi?CH=57662 Change 57662 by marcel@marcel_nfs on 2004/07/19 00:10:58 Revert changes to libc_r. It's actually better to not touch libc_r, because that guarantees that we can use a 5.x gdb(1) on a 4.x threaded program. Affected files ... .. //depot/projects/gdb/lib/libc_r/uthread/pthread_private.h#5 edit .. //depot/projects/gdb/lib/libc_r/uthread/uthread_create.c#3 edit .. //depot/projects/gdb/lib/libc_r/uthread/uthread_init.c#4 edit Differences ... ==== //depot/projects/gdb/lib/libc_r/uthread/pthread_private.h#5 (text+ko) ==== @@ -1180,21 +1180,6 @@ #endif ; -/* - * libthread_db.so support. - */ -SCLASS int _libc_r_debug -#ifdef GLOBAL_PTHREAD_PRIVATE -= 0 -#endif -; - -SCLASS int _libc_r_lwpid -#ifdef GLOBAL_PTHREAD_PRIVATE -= 0 -#endif -; - /* Undefine the storage class specifier: */ #undef SCLASS ==== //depot/projects/gdb/lib/libc_r/uthread/uthread_create.c#3 (text+ko) ==== @@ -46,7 +46,7 @@ #include "pthread_private.h" #include "libc_private.h" -static u_int64_t last_uniqueid = 1; +static u_int64_t next_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 = ++last_uniqueid; + new_thread->uniqueid = next_uniqueid++; /* * Check if the garbage collector thread ==== //depot/projects/gdb/lib/libc_r/uthread/uthread_init.c#4 (text+ko) ==== @@ -337,7 +337,6 @@ memset(&_thread_kern_thread, 0, sizeof(struct pthread)); _thread_kern_thread.flags = PTHREAD_FLAGS_PRIVATE; memset(_thread_initial, 0, sizeof(struct pthread)); - _thread_initial->uniqueid = 1; /* Initialize the waiting and work queues: */ TAILQ_INIT(&_waitingq);