Date: Fri, 2 Jul 2004 01:44:39 GMT From: Marcel Moolenaar <marcel@FreeBSD.org> To: Perforce Change Reviews <perforce@freebsd.org> Subject: PERFORCE change 56248 for review Message-ID: <200407020144.i621idqa003615@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=56248 Change 56248 by marcel@marcel_nfs on 2004/07/02 01:43:50 Complete the reversal of the introduction of the getlwpid(2) syscall. We don't need it anymore. Affected files ... .. //depot/projects/gdb/include/unistd.h#4 edit .. //depot/projects/gdb/lib/libc_r/uthread/uthread_init.c#3 edit .. //depot/projects/gdb/lib/libthr/thread/thr_cond.c#6 edit .. //depot/projects/gdb/lib/libthr/thread/thr_init.c#7 edit .. //depot/projects/gdb/lib/libthr/thread/thr_mutex.c#7 edit .. //depot/projects/gdb/lib/libthr/thread/thr_private.h#9 edit .. //depot/projects/gdb/sys/kern/kern_prot.c#7 edit Differences ... ==== //depot/projects/gdb/include/unistd.h#4 (text+ko) ==== @@ -48,11 +48,6 @@ #define _GID_T_DECLARED #endif -#ifndef _LWPID_T_DECLARED -typedef __lwpid_t lwpid_t; -#define _LWPID_T_DECLARED -#endif - #ifndef _OFF_T_DECLARED typedef __off_t off_t; #define _OFF_T_DECLARED @@ -345,7 +340,6 @@ gid_t getgid(void); int getgroups(int, gid_t []); char *getlogin(void); -lwpid_t getlwpid(void); pid_t getpgrp(void); pid_t getpid(void); pid_t getppid(void); ==== //depot/projects/gdb/lib/libc_r/uthread/uthread_init.c#3 (text+ko) ==== @@ -346,9 +346,6 @@ /* Initialize the scheduling switch hook routine: */ _sched_switch_hook = NULL; - /* Save the lwpid of the one LWP this process has. */ - _libc_r_lwpid = getlwpid(); - /* Give this thread default attributes: */ memcpy((void *) &_thread_initial->attr, &_pthread_attr_default, sizeof(struct pthread_attr)); ==== //depot/projects/gdb/lib/libthr/thread/thr_cond.c#6 (text+ko) ==== @@ -440,10 +440,10 @@ 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->lwpid); + pthread->name, pthread->uniqueid); if ((pthread->flags & PTHREAD_FLAGS_IN_MUTEXQ) != 0) _thread_printf(2, "Thread (%s:%u) already on mutexq\n", - pthread->name, pthread->lwpid); + pthread->name, pthread->uniqueid); PTHREAD_ASSERT_NOT_IN_SYNCQ(pthread); /* ==== //depot/projects/gdb/lib/libthr/thread/thr_init.c#7 (text+ko) ==== @@ -304,7 +304,6 @@ /* Get our thread id. */ thr_self(&pthread->thr_id); - pthread->lwpid = getlwpid(); /* Find the stack top */ mib[0] = CTL_KERN; ==== //depot/projects/gdb/lib/libthr/thread/thr_mutex.c#7 (text+ko) ==== @@ -800,10 +800,10 @@ 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->lwpid); + pthread->name, pthread->uniqueid); if ((pthread->flags & PTHREAD_FLAGS_IN_MUTEXQ) != 0) _thread_printf(2, "Thread (%s:%u) already on mutexq\n", - pthread->name, pthread->lwpid); + pthread->name, pthread->uniqueid); 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#9 (text+ko) ==== @@ -477,8 +477,8 @@ */ #define PTHREAD_MAGIC ((u_int32_t) 0xd09ba115) u_int32_t magic; - lwpid_t lwpid; /* for gdb */ char *name; + u_int64_t uniqueid; /* for gdb */ thr_id_t thr_id; sigset_t savedsig; int signest; /* blocked signal netsting level */ ==== //depot/projects/gdb/sys/kern/kern_prot.c#7 (text+ko) ==== @@ -70,23 +70,6 @@ "BSD security policy"); #ifndef _SYS_SYSPROTO_H_ -struct getlwpid_args { - int dummy; -}; -#endif -/* - * MPSAFE - */ -/* ARGSUSED */ -int -getlwpid(struct thread *td, struct getlwpid_args *uap) -{ - - td->td_retval[0] = td->td_tid; - return (0); -} - -#ifndef _SYS_SYSPROTO_H_ struct getpid_args { int dummy; };
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200407020144.i621idqa003615>