Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 19 Jul 2004 00:11:31 GMT
From:      Marcel Moolenaar <marcel@FreeBSD.org>
To:        Perforce Change Reviews <perforce@freebsd.org>
Subject:   PERFORCE change 57662 for review
Message-ID:  <200407190011.i6J0BVpE008733@repoman.freebsd.org>

next in thread | raw e-mail | index | archive | help
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);



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200407190011.i6J0BVpE008733>