Module Name: src
Committed By: matt
Date: Sat Mar 12 07:46:29 UTC 2011
Modified Files:
src/lib/libpthread: pthread.c
Log Message:
Use __lwp_gettcb_fast if present.
To generate a diff of this commit:
cvs rdiff -u -r1.121 -r1.122 src/lib/libpthread/pthread.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/lib/libpthread/pthread.c
diff -u src/lib/libpthread/pthread.c:1.121 src/lib/libpthread/pthread.c:1.122
--- src/lib/libpthread/pthread.c:1.121 Wed Mar 9 23:10:06 2011
+++ src/lib/libpthread/pthread.c Sat Mar 12 07:46:29 2011
@@ -1,4 +1,4 @@
-/* $NetBSD: pthread.c,v 1.121 2011/03/09 23:10:06 joerg Exp $ */
+/* $NetBSD: pthread.c,v 1.122 2011/03/12 07:46:29 matt Exp $ */
/*-
* Copyright (c) 2001, 2002, 2003, 2006, 2007, 2008 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
*/
#include <sys/cdefs.h>
-__RCSID("$NetBSD: pthread.c,v 1.121 2011/03/09 23:10:06 joerg Exp $");
+__RCSID("$NetBSD: pthread.c,v 1.122 2011/03/12 07:46:29 matt Exp $");
#define __EXPOSE_STACK 1
@@ -196,7 +196,11 @@
pthread__scrubthread(first, NULL, 0);
#if defined(__HAVE_TLS_VARIANT_I) || defined(__HAVE_TLS_VARIANT_II)
+#ifdef __HAVE___LWP_GETTCB_FAST
+ first->pt_tls = __lwp_gettcb_fast();
+#else
first->pt_tls = _lwp_getprivate();
+#endif
first->pt_tls->tcb_pthread = first;
#endif