summaryrefslogtreecommitdiffstats
path: root/lib/libpthread/thread
diff options
context:
space:
mode:
authordfr <dfr@FreeBSD.org>2004-08-15 16:28:05 +0000
committerdfr <dfr@FreeBSD.org>2004-08-15 16:28:05 +0000
commit4dd05c8c572e558551ca8d6bdb39b3eabc191751 (patch)
tree582fc094cd01bd155a2e8f0db27faf9fded5d15c /lib/libpthread/thread
parenteebd52f2bba016b347822a238d57326feab23fc1 (diff)
downloadFreeBSD-src-4dd05c8c572e558551ca8d6bdb39b3eabc191751.zip
FreeBSD-src-4dd05c8c572e558551ca8d6bdb39b3eabc191751.tar.gz
Add TLS support for i386 and amd64.
Diffstat (limited to 'lib/libpthread/thread')
-rw-r--r--lib/libpthread/thread/thr_kern.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/libpthread/thread/thr_kern.c b/lib/libpthread/thread/thr_kern.c
index 926ca4b..ac8bf5a 100644
--- a/lib/libpthread/thread/thr_kern.c
+++ b/lib/libpthread/thread/thr_kern.c
@@ -2382,7 +2382,7 @@ _thr_alloc(struct pthread *curthread)
if ((thread == NULL) &&
((thread = malloc(sizeof(struct pthread))) != NULL)) {
bzero(thread, sizeof(struct pthread));
- if ((thread->tcb = _tcb_ctor(thread)) == NULL) {
+ if ((thread->tcb = _tcb_ctor(thread, curthread == NULL)) == NULL) {
free(thread);
thread = NULL;
} else {
OpenPOWER on IntegriCloud