Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/lib/libpthread_dbg tsd_alloc is no more, use tsd_list, and d...
details: https://anonhg.NetBSD.org/src/rev/4135f69a6147
branches: trunk
changeset: 784167:4135f69a6147
user: christos <christos%NetBSD.org@localhost>
date: Sun Jan 20 18:18:07 2013 +0000
description:
tsd_alloc is no more, use tsd_list, and disable the destructor walking code
since it needs work. Fixes gdb.
diffstat:
lib/libpthread_dbg/pthread_dbg.c | 14 +++++++++-----
lib/libpthread_dbg/pthread_dbg_int.h | 2 +-
2 files changed, 10 insertions(+), 6 deletions(-)
diffs (72 lines):
diff -r 34efecc6f429 -r 4135f69a6147 lib/libpthread_dbg/pthread_dbg.c
--- a/lib/libpthread_dbg/pthread_dbg.c Sun Jan 20 17:09:47 2013 +0000
+++ b/lib/libpthread_dbg/pthread_dbg.c Sun Jan 20 18:18:07 2013 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: pthread_dbg.c,v 1.40 2008/03/07 22:27:07 ad Exp $ */
+/* $NetBSD: pthread_dbg.c,v 1.41 2013/01/20 18:18:07 christos Exp $ */
/*-
* Copyright (c) 2002 Wasabi Systems, Inc.
@@ -36,7 +36,7 @@
*/
#include <sys/cdefs.h>
-__RCSID("$NetBSD: pthread_dbg.c,v 1.40 2008/03/07 22:27:07 ad Exp $");
+__RCSID("$NetBSD: pthread_dbg.c,v 1.41 2013/01/20 18:18:07 christos Exp $");
#define __EXPOSE_STACK 1
@@ -95,13 +95,13 @@
}
proc->allqaddr = addr;
- val = LOOKUP(proc, "pthread__tsd_alloc", &addr);
+ val = LOOKUP(proc, "pthread__tsd_list", &addr);
if (val != 0) {
if (val == TD_ERR_NOSYM)
val = TD_ERR_NOLIB;
goto error;
}
- proc->tsdallocaddr = addr;
+ proc->tsdlistaddr = addr;
val = LOOKUP(proc, "pthread__tsd_destructors", &addr);
if (val != 0) {
@@ -418,13 +418,14 @@
td_tsd_iter(td_proc_t *proc,
int (*call)(pthread_key_t, void (*)(void *), void *), void *arg)
{
+#ifdef notyet
int val;
int i;
void *allocated;
void (*destructor)(void *);
for (i = 0; i < PTHREAD_KEYS_MAX; i++) {
- val = READ(proc, proc->tsdallocaddr + i * sizeof(allocated),
+ val = READ(proc, proc->tsdlistaddr + i * sizeof(allocated),
&allocated, sizeof(allocated));
if (val != 0)
return val;
@@ -441,6 +442,9 @@
return val;
}
}
+#else
+ abort();
+#endif
return 0;
}
diff -r 34efecc6f429 -r 4135f69a6147 lib/libpthread_dbg/pthread_dbg_int.h
--- a/lib/libpthread_dbg/pthread_dbg_int.h Sun Jan 20 17:09:47 2013 +0000
+++ b/lib/libpthread_dbg/pthread_dbg_int.h Sun Jan 20 18:18:07 2013 +0000
@@ -12,7 +12,7 @@
caddr_t idleqaddr;
caddr_t suspqaddr;
caddr_t maxlwpsaddr;
- caddr_t tsdallocaddr;
+ caddr_t tsdlistaddr;
caddr_t tsddestaddr;
caddr_t stacksizeaddr;
Home |
Main Index |
Thread Index |
Old Index