Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/lib/libpthread_dbg Catch up with correct pt_magic reads in t...
details: https://anonhg.NetBSD.org/src/rev/d5f483df6ca5
branches: trunk
changeset: 349003:d5f483df6ca5
user: kamil <kamil%NetBSD.org@localhost>
date: Sun Nov 20 03:11:32 2016 +0000
description:
Catch up with correct pt_magic reads in td_thr_{getname,suspend,resume}
The pt_magic field is not the first one in the pthread_t structure.
Sponsored by <The NetBSD Foundation>
diffstat:
lib/libpthread_dbg/pthread_dbg.c | 10 +++++-----
1 files changed, 5 insertions(+), 5 deletions(-)
diffs (45 lines):
diff -r 4668a2578708 -r d5f483df6ca5 lib/libpthread_dbg/pthread_dbg.c
--- a/lib/libpthread_dbg/pthread_dbg.c Sun Nov 20 02:38:24 2016 +0000
+++ b/lib/libpthread_dbg/pthread_dbg.c Sun Nov 20 03:11:32 2016 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: pthread_dbg.c,v 1.45 2016/11/20 02:27:56 kamil Exp $ */
+/* $NetBSD: pthread_dbg.c,v 1.46 2016/11/20 03:11:32 kamil Exp $ */
/*-
* Copyright (c) 2002 Wasabi Systems, Inc.
@@ -36,7 +36,7 @@
*/
#include <sys/cdefs.h>
-__RCSID("$NetBSD: pthread_dbg.c,v 1.45 2016/11/20 02:27:56 kamil Exp $");
+__RCSID("$NetBSD: pthread_dbg.c,v 1.46 2016/11/20 03:11:32 kamil Exp $");
#define __EXPOSE_STACK 1
@@ -263,7 +263,7 @@
caddr_t nameaddr;
- val = READ(thread->proc, thread->addr, &tmp, sizeof(tmp));
+ val = READ(thread->proc, OFFSET(thread, pt_magic), &tmp, sizeof(tmp));
if (val != 0)
return val;
@@ -441,7 +441,7 @@
int tmp, val;
/* validate the thread */
- val = READ(thread->proc, thread->addr, &tmp, sizeof(tmp));
+ val = READ(thread->proc, OFFSET(thread, pt_magic), &tmp, sizeof(tmp));
if (val != 0)
return val;
if (tmp != PT_MAGIC)
@@ -463,7 +463,7 @@
int tmp, val;
/* validate the thread */
- val = READ(thread->proc, thread->addr, &tmp, sizeof(tmp));
+ val = READ(thread->proc, OFFSET(thread, pt_magic), &tmp, sizeof(tmp));
if (val != 0)
return val;
if (tmp != PT_MAGIC)
Home |
Main Index |
Thread Index |
Old Index