From owner-cvs-lib Tue Jun 9 16:14:29 1998 Return-Path: Received: (from daemon@localhost) by hub.freebsd.org (8.8.8/8.8.8) id QAA27859 for cvs-lib-outgoing; Tue, 9 Jun 1998 16:14:29 -0700 (PDT) (envelope-from owner-cvs-lib) Received: from freefall.freebsd.org (freefall.FreeBSD.ORG [204.216.27.21]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id QAA27549; Tue, 9 Jun 1998 16:13:16 -0700 (PDT) (envelope-from jb@FreeBSD.org) From: John Birrell Received: (from jb@localhost) by freefall.freebsd.org (8.8.8/8.8.5) id QAA02445; Tue, 9 Jun 1998 16:13:12 -0700 (PDT) Date: Tue, 9 Jun 1998 16:13:12 -0700 (PDT) Message-Id: <199806092313.QAA02445@freefall.freebsd.org> To: cvs-committers@FreeBSD.ORG, cvs-all@FreeBSD.ORG, cvs-lib@FreeBSD.ORG Subject: cvs commit: src/lib/libc_r/uthread uthread_spinlock.c Sender: owner-cvs-lib@FreeBSD.ORG X-Loop: FreeBSD.org Precedence: bulk jb 1998/06/09 16:13:11 PDT Modified files: lib/libc_r/uthread uthread_spinlock.c Log: Add support for compile time debug. This is enabled if libc_r is built with -D_LOCK_DEBUG. This adds the file name and line number to each lock call and these are stored in the spinlock structure. When using debug mode, the lock function will check if the thread is trying to lock something it has already locked. This is not supposed to happen because the lock will be freed too early. Without lock debug, libc_r should be smaller and slightly faster. Revision Changes Path 1.4 +52 -20 src/lib/libc_r/uthread/uthread_spinlock.c