PERFORCE change 76487 for review

David Xu davidxu at FreeBSD.org
Wed May 4 05:44:41 PDT 2005


http://perforce.freebsd.org/chv.cgi?CH=76487

Change 76487 by davidxu at 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_ */


More information about the p4-projects mailing list