Date: Fri, 2 Jul 2004 01:46:42 GMT From: Marcel Moolenaar <marcel@FreeBSD.org> To: Perforce Change Reviews <perforce@freebsd.org> Subject: PERFORCE change 56249 for review Message-ID: <200407020146.i621kgGE003757@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=56249 Change 56249 by marcel@marcel_nfs on 2004/07/02 01:45:49 IFC @56244 Affected files ... .. //depot/projects/gdb/lib/libthr/thread/thr_cond.c#7 integrate .. //depot/projects/gdb/lib/libthr/thread/thr_create.c#7 integrate .. //depot/projects/gdb/lib/libthr/thread/thr_mutex.c#8 integrate .. //depot/projects/gdb/lib/libthr/thread/thr_private.h#10 integrate Differences ... ==== //depot/projects/gdb/lib/libthr/thread/thr_cond.c#7 (text+ko) ==== @@ -29,7 +29,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $FreeBSD: src/lib/libthr/thread/thr_cond.c,v 1.14 2004/05/20 12:06:16 mtm Exp $ + * $FreeBSD: src/lib/libthr/thread/thr_cond.c,v 1.15 2004/07/02 00:40:07 marcel Exp $ */ #include <stdlib.h> #include <errno.h> @@ -439,11 +439,11 @@ name = pthread->name ? pthread->name : "unknown"; if ((pthread->flags & PTHREAD_FLAGS_IN_CONDQ) != 0) - _thread_printf(2, "Thread (%s:%u) already on condq\n", - pthread->name, pthread->uniqueid); + _thread_printf(2, "Thread (%s:%ld) already on condq\n", + pthread->name, pthread->thr_id); if ((pthread->flags & PTHREAD_FLAGS_IN_MUTEXQ) != 0) - _thread_printf(2, "Thread (%s:%u) already on mutexq\n", - pthread->name, pthread->uniqueid); + _thread_printf(2, "Thread (%s:%ld) already on mutexq\n", + pthread->name, pthread->thr_id); PTHREAD_ASSERT_NOT_IN_SYNCQ(pthread); /* ==== //depot/projects/gdb/lib/libthr/thread/thr_create.c#7 (text+ko) ==== @@ -29,7 +29,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $FreeBSD: src/lib/libthr/thread/thr_create.c,v 1.16 2004/06/30 15:57:36 mtm Exp $ + * $FreeBSD: src/lib/libthr/thread/thr_create.c,v 1.17 2004/07/02 00:40:07 marcel Exp $ */ #include <errno.h> #include <stdlib.h> @@ -43,11 +43,8 @@ #include "thr_private.h" #include "libc_private.h" -static u_int64_t next_uniqueid = 1; - #define OFF(f) offsetof(struct pthread, f) int _thread_next_offset = OFF(tle.tqe_next); -int _thread_uniqueid_offset = OFF(uniqueid); int _thread_name_offset = OFF(name); int _thread_ctx_offset = OFF(ctx); #undef OFF @@ -137,12 +134,6 @@ } new_thread->active_priority = new_thread->base_priority; - /* - * Initialise the unique id which GDB uses to - * track threads. - */ - new_thread->uniqueid = next_uniqueid++; - THREAD_LIST_LOCK; /* Add the thread to the linked list of all threads: */ ==== //depot/projects/gdb/lib/libthr/thread/thr_mutex.c#8 (text+ko) ==== @@ -29,7 +29,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $FreeBSD: src/lib/libthr/thread/thr_mutex.c,v 1.28 2004/05/20 12:06:16 mtm Exp $ + * $FreeBSD: src/lib/libthr/thread/thr_mutex.c,v 1.29 2004/07/02 00:40:07 marcel Exp $ */ #include <stdlib.h> #include <errno.h> @@ -799,11 +799,11 @@ name = pthread->name ? pthread->name : "unknown"; if ((pthread->flags & PTHREAD_FLAGS_IN_CONDQ) != 0) - _thread_printf(2, "Thread (%s:%u) already on condq\n", - pthread->name, pthread->uniqueid); + _thread_printf(2, "Thread (%s:%ld) already on condq\n", + pthread->name, pthread->thr_id); if ((pthread->flags & PTHREAD_FLAGS_IN_MUTEXQ) != 0) - _thread_printf(2, "Thread (%s:%u) already on mutexq\n", - pthread->name, pthread->uniqueid); + _thread_printf(2, "Thread (%s:%ld) already on mutexq\n", + pthread->name, pthread->thr_id); PTHREAD_ASSERT_NOT_IN_SYNCQ(pthread); /* * For the common case of all threads having equal priority, ==== //depot/projects/gdb/lib/libthr/thread/thr_private.h#10 (text+ko) ==== @@ -31,7 +31,7 @@ * * Private thread definitions for the uthread kernel. * - * $FreeBSD: src/lib/libthr/thread/thr_private.h,v 1.37 2004/06/27 10:01:35 mtm Exp $ + * $FreeBSD: src/lib/libthr/thread/thr_private.h,v 1.38 2004/07/02 00:40:07 marcel Exp $ */ #ifndef _THR_PRIVATE_H @@ -478,8 +478,7 @@ #define PTHREAD_MAGIC ((u_int32_t) 0xd09ba115) u_int32_t magic; char *name; - u_int64_t uniqueid; /* for gdb */ - thr_id_t thr_id; + long thr_id; sigset_t savedsig; int signest; /* blocked signal netsting level */ int ptdflags; /* used by other other threads
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200407020146.i621kgGE003757>