From owner-p4-projects@FreeBSD.ORG Fri Jul 2 01:45:24 2004 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id E12A916A4D1; Fri, 2 Jul 2004 01:45:23 +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 7EE8D16A4CE for ; Fri, 2 Jul 2004 01:45:23 +0000 (GMT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 650F943D1F for ; Fri, 2 Jul 2004 01:45:23 +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 i621idng003618 for ; Fri, 2 Jul 2004 01:44:39 GMT (envelope-from marcel@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.12.11/8.12.11/Submit) id i621idqa003615 for perforce@freebsd.org; Fri, 2 Jul 2004 01:44:39 GMT (envelope-from marcel@freebsd.org) Date: Fri, 2 Jul 2004 01:44:39 GMT Message-Id: <200407020144.i621idqa003615@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 56248 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: Fri, 02 Jul 2004 01:45:25 -0000 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; };