Source-Changes-HG archive

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

[src/trunk]: src/lib/libpthread_dbg Only the first symbol (pthread_dbg) shoul...



details:   https://anonhg.NetBSD.org/src/rev/80a9a1bee96e
branches:  trunk
changeset: 784168:80a9a1bee96e
user:      christos <christos%NetBSD.org@localhost>
date:      Sun Jan 20 18:45:19 2013 +0000

description:
Only the first symbol (pthread_dbg) should return NOLIB, the rest indicate
internal inconsistencies, so let the code return a more vocal error.

diffstat:

 lib/libpthread_dbg/pthread_dbg.c |  19 +++++--------------
 1 files changed, 5 insertions(+), 14 deletions(-)

diffs (49 lines):

diff -r 4135f69a6147 -r 80a9a1bee96e lib/libpthread_dbg/pthread_dbg.c
--- a/lib/libpthread_dbg/pthread_dbg.c  Sun Jan 20 18:18:07 2013 +0000
+++ b/lib/libpthread_dbg/pthread_dbg.c  Sun Jan 20 18:45:19 2013 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: pthread_dbg.c,v 1.41 2013/01/20 18:18:07 christos Exp $        */
+/*     $NetBSD: pthread_dbg.c,v 1.42 2013/01/20 18:45:19 christos Exp $        */
 
 /*-
  * Copyright (c) 2002 Wasabi Systems, Inc.
@@ -36,7 +36,7 @@
  */
 
 #include <sys/cdefs.h>
-__RCSID("$NetBSD: pthread_dbg.c,v 1.41 2013/01/20 18:18:07 christos Exp $");
+__RCSID("$NetBSD: pthread_dbg.c,v 1.42 2013/01/20 18:45:19 christos Exp $");
 
 #define __EXPOSE_STACK 1
 
@@ -88,27 +88,18 @@
        proc->dbgaddr = addr;
 
        val = LOOKUP(proc, "pthread__allqueue", &addr);
-       if (val != 0) {
-               if (val == TD_ERR_NOSYM)
-                       val = TD_ERR_NOLIB;
+       if (val != 0)
                goto error;
-       }
        proc->allqaddr = addr;
 
        val = LOOKUP(proc, "pthread__tsd_list", &addr);
-       if (val != 0) {
-               if (val == TD_ERR_NOSYM)
-                       val = TD_ERR_NOLIB;
+       if (val != 0)
                goto error;
-       }
        proc->tsdlistaddr = addr;
 
        val = LOOKUP(proc, "pthread__tsd_destructors", &addr);
-       if (val != 0) {
-               if (val == TD_ERR_NOSYM)
-                       val = TD_ERR_NOLIB;
+       if (val != 0)
                goto error;
-       }
        proc->tsddestaddr = addr;
 
        val = READ(proc, proc->dbgaddr, &dbg, sizeof(int));



Home | Main Index | Thread Index | Old Index