Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/lib/libpthread Use __lwp_gettcb_fast if present.



details:   https://anonhg.NetBSD.org/src/rev/2988d38e19ad
branches:  trunk
changeset: 763173:2988d38e19ad
user:      matt <matt%NetBSD.org@localhost>
date:      Sat Mar 12 07:46:29 2011 +0000

description:
Use __lwp_gettcb_fast if present.

diffstat:

 lib/libpthread/pthread.c |  8 ++++++--
 1 files changed, 6 insertions(+), 2 deletions(-)

diffs (30 lines):

diff -r b3d2f4ff68a4 -r 2988d38e19ad lib/libpthread/pthread.c
--- a/lib/libpthread/pthread.c  Sat Mar 12 07:43:53 2011 +0000
+++ b/lib/libpthread/pthread.c  Sat Mar 12 07:46:29 2011 +0000
@@ -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
 



Home | Main Index | Thread Index | Old Index