Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/nathanw_sa]: src/lib/libpthread Track the largest LWP we've seen, to aid...
details: https://anonhg.NetBSD.org/src/rev/aa45a90810fb
branches: nathanw_sa
changeset: 506343:aa45a90810fb
user: nathanw <nathanw%NetBSD.org@localhost>
date: Wed Oct 16 19:30:33 2002 +0000
description:
Track the largest LWP we've seen, to aid debuggers.
(XXX probably better handled with a ptrace query, but that will
require more careful consideration)
diffstat:
lib/libpthread/pthread_sa.c | 6 +++++-
1 files changed, 5 insertions(+), 1 deletions(-)
diffs (27 lines):
diff -r ec5ea591882e -r aa45a90810fb lib/libpthread/pthread_sa.c
--- a/lib/libpthread/pthread_sa.c Wed Oct 16 19:23:56 2002 +0000
+++ b/lib/libpthread/pthread_sa.c Wed Oct 16 19:30:33 2002 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: pthread_sa.c,v 1.1.2.26 2002/08/31 00:08:43 nathanw Exp $ */
+/* $NetBSD: pthread_sa.c,v 1.1.2.27 2002/10/16 19:30:33 nathanw Exp $ */
/*-
* Copyright (c) 2001 The NetBSD Foundation, Inc.
@@ -68,6 +68,8 @@
int recycle_side;
pthread_spin_t recycle_lock;
+int pthread__maxlwps;
+
extern struct pthread_queue_t runqueue;
#define pthread__sa_id(sap) (pthread__id((sap)->sa_context))
@@ -92,6 +94,8 @@
self = pthread__self();
self->pt_state = PT_STATE_RUNNING;
+ if (sas[0]->sa_id > pthread__maxlwps)
+ pthread__maxlwps = sas[0]->sa_id;
SDPRINTF(("(up %p) type %d LWP %d ev %d intr %d\n", self,
type, sas[0]->sa_id, ev ? sas[1]->sa_id : 0,
intr ? sas[ev+intr]->sa_id : 0));
Home |
Main Index |
Thread Index |
Old Index