From owner-p4-projects@FreeBSD.ORG Wed May 4 12:44:41 2005 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id E4D4D16A4D9; Wed, 4 May 2005 12:44:40 +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 1EFDA16A4E6 for ; Wed, 4 May 2005 12:44:40 +0000 (GMT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id F084D43D68 for ; Wed, 4 May 2005 12:44:39 +0000 (GMT) (envelope-from davidxu@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id j44Ci4nJ043330 for ; Wed, 4 May 2005 12:44:04 GMT (envelope-from davidxu@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id j44Ci3tH043327 for perforce@freebsd.org; Wed, 4 May 2005 12:44:03 GMT (envelope-from davidxu@freebsd.org) Date: Wed, 4 May 2005 12:44:03 GMT Message-Id: <200505041244.j44Ci3tH043327@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to davidxu@freebsd.org using -f From: David Xu To: Perforce Change Reviews Subject: PERFORCE change 76487 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: Wed, 04 May 2005 12:44:41 -0000 http://perforce.freebsd.org/chv.cgi?CH=76487 Change 76487 by davidxu@davidxu_alona on 2005/05/04 12:43:12 Unconditionally access thread pointer register. Affected files ... .. //depot/projects/davidxu_thread/src/lib/libthr/arch/amd64/include/pthread_md.h#2 edit .. //depot/projects/davidxu_thread/src/lib/libthr/arch/i386/include/pthread_md.h#3 edit .. //depot/projects/davidxu_thread/src/lib/libthr/arch/sparc64/include/pthread_md.h#2 edit Differences ... ==== //depot/projects/davidxu_thread/src/lib/libthr/arch/amd64/include/pthread_md.h#2 (text+ko) ==== @@ -91,13 +91,9 @@ return (TCB_GET64(tcb_self)); } -extern struct pthread *_thr_initial; - static __inline struct pthread * _get_curthread(void) { - if (_thr_initial) - return (TCB_GET64(tcb_thread)); - return (NULL); + return (TCB_GET64(tcb_thread)); } #endif ==== //depot/projects/davidxu_thread/src/lib/libthr/arch/i386/include/pthread_md.h#3 (text+ko) ==== @@ -109,14 +109,10 @@ return (TCB_GET32(tcb_self)); } -extern struct pthread *_thr_initial; - /* Get the current thread. */ static __inline struct pthread * _get_curthread(void) { - if (_thr_initial) - return (TCB_GET32(tcb_thread)); - return (NULL); + return (TCB_GET32(tcb_thread)); } #endif ==== //depot/projects/davidxu_thread/src/lib/libthr/arch/sparc64/include/pthread_md.h#2 (text+ko) ==== @@ -74,14 +74,10 @@ return (_tcb); } -extern struct pthread *_thr_initial; - static __inline struct pthread * _get_curthread(void) { - if (_thr_initial) - return (_tcb->tcb_thread); - return (NULL); + return (_tcb->tcb_thread); } #endif /* _PTHREAD_MD_H_ */