summaryrefslogtreecommitdiffstats
path: root/lib/libthr/arch/amd64/include/pthread_md.h
diff options
context:
space:
mode:
authordavidxu <davidxu@FreeBSD.org>2006-04-04 03:26:06 +0000
committerdavidxu <davidxu@FreeBSD.org>2006-04-04 03:26:06 +0000
commit8bff50a485059fe12389243cff1a7c87c1106531 (patch)
treeaa51415180b41bdb161e607aed018f1da6c064a9 /lib/libthr/arch/amd64/include/pthread_md.h
parent60609380bc28101514b8b5e88a2182bb37a9e6ff (diff)
downloadFreeBSD-src-8bff50a485059fe12389243cff1a7c87c1106531.zip
FreeBSD-src-8bff50a485059fe12389243cff1a7c87c1106531.tar.gz
Simplify _get_curthread() and _tcb_ctor because libc and rtld now
already allocate thread pointer space in tls block for initial thread. Only i386 and amd64 have been done, others still have to be tested.
Diffstat (limited to 'lib/libthr/arch/amd64/include/pthread_md.h')
-rw-r--r--lib/libthr/arch/amd64/include/pthread_md.h4
1 files changed, 1 insertions, 3 deletions
diff --git a/lib/libthr/arch/amd64/include/pthread_md.h b/lib/libthr/arch/amd64/include/pthread_md.h
index 4500f6b..d12d6e4 100644
--- a/lib/libthr/arch/amd64/include/pthread_md.h
+++ b/lib/libthr/arch/amd64/include/pthread_md.h
@@ -96,8 +96,6 @@ 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
OpenPOWER on IntegriCloud