Date: Wed, 4 May 2005 12:44:03 GMT From: David Xu <davidxu@FreeBSD.org> To: Perforce Change Reviews <perforce@freebsd.org> Subject: PERFORCE change 76487 for review Message-ID: <200505041244.j44Ci3tH043327@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
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_ */
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200505041244.j44Ci3tH043327>