Source-Changes-HG archive

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

[src/trunk]: src/lib/libpthread Back out using the thread register (if presen...



details:   https://anonhg.NetBSD.org/src/rev/2eb3d9fd210c
branches:  trunk
changeset: 762679:2eb3d9fd210c
user:      joerg <joerg%NetBSD.org@localhost>
date:      Fri Feb 25 14:32:38 2011 +0000

description:
Back out using the thread register (if present) for now.

libgcc_s's __register_frame_info gets called from libc's CSU code before
the libc constructors are run. __register_frame_info in turn calls
pthread_mutex_lock. libpthread is not initialised at this point and
therefore pthread__self() traps when deferencing the thread register.
This worked before because the garbage from pthread__self() is
effectively ignored.

diffstat:

 lib/libpthread/pthread_int.h |  4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diffs (18 lines):

diff -r 572307115bb3 -r 2eb3d9fd210c lib/libpthread/pthread_int.h
--- a/lib/libpthread/pthread_int.h      Fri Feb 25 14:11:25 2011 +0000
+++ b/lib/libpthread/pthread_int.h      Fri Feb 25 14:32:38 2011 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: pthread_int.h,v 1.74 2011/02/24 04:28:43 joerg Exp $   */
+/*     $NetBSD: pthread_int.h,v 1.75 2011/02/25 14:32:38 joerg Exp $   */
 
 /*-
  * Copyright (c) 2001, 2002, 2003, 2006, 2007, 2008 The NetBSD Foundation, Inc.
@@ -250,7 +250,7 @@
        } while (/*CONSTCOND*/0)
 
 
-#ifdef __HAVE___LWP_GETPRIVATE_FAST
+#if 0 && defined(__HAVE___LWP_GETPRIVATE_FAST)
 static inline pthread_t __constfunc
 pthread__self(void)
 {



Home | Main Index | Thread Index | Old Index