From owner-cvs-all@FreeBSD.ORG Thu Jul 31 11:50:59 2003 Return-Path: Delivered-To: cvs-all@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id EFBAC37B401; Thu, 31 Jul 2003 11:50:59 -0700 (PDT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 84E8D43F93; Thu, 31 Jul 2003 11:50:59 -0700 (PDT) (envelope-from jhb@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.12.6/8.12.6) with ESMTP id h6VIox0U091647; Thu, 31 Jul 2003 11:50:59 -0700 (PDT) (envelope-from jhb@repoman.freebsd.org) Received: (from jhb@localhost) by repoman.freebsd.org (8.12.6/8.12.6/Submit) id h6VIow8g091646; Thu, 31 Jul 2003 11:50:58 -0700 (PDT) Message-Id: <200307311850.h6VIow8g091646@repoman.freebsd.org> From: John Baldwin Date: Thu, 31 Jul 2003 11:50:58 -0700 (PDT) To: src-committers@FreeBSD.org, cvs-src@FreeBSD.org, cvs-all@FreeBSD.org X-FreeBSD-CVS-Branch: HEAD Subject: cvs commit: src/sys/kern subr_witness.c src/sys/sys lock.h X-BeenThere: cvs-all@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: CVS commit messages for the entire tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 31 Jul 2003 18:51:00 -0000 jhb 2003/07/31 11:50:58 PDT FreeBSD src repository Modified files: sys/kern subr_witness.c sys/sys lock.h Log: Add a new function to look for a spinlock's instance when it is held by another thread. We use the td_oncpu member of the other field to locate it's associated CPU and then search the that CPU's list of spin locks contained in its per-CPU data. This is not always safe and may in fact panic or just not work, but it is useful in at least one case. Revision Changes Path 1.157 +21 -0 src/sys/kern/subr_witness.c 1.48 +1 -0 src/sys/sys/lock.h