From owner-freebsd-current Thu Oct 30 23:39:03 1997 Return-Path: Received: (from root@localhost) by hub.freebsd.org (8.8.7/8.8.7) id XAA19060 for current-outgoing; Thu, 30 Oct 1997 23:39:03 -0800 (PST) (envelope-from owner-freebsd-current) Received: from hydrogen.nike.efn.org (resnet.uoregon.edu [128.223.170.28]) by hub.freebsd.org (8.8.7/8.8.7) with ESMTP id XAA19049 for ; Thu, 30 Oct 1997 23:38:59 -0800 (PST) (envelope-from gurney_j@efn.org) Received: (from jmg@localhost) by hydrogen.nike.efn.org (8.8.7/8.8.7) id XAA23730; Thu, 30 Oct 1997 23:38:47 -0800 (PST) Message-ID: <19971030233846.44353@hydrogen.nike.efn.org> Date: Thu, 30 Oct 1997 23:38:46 -0800 From: John-Mark Gurney To: Simon Shapiro Cc: freebsd-current@FreeBSD.ORG Subject: Re: More on LINT Kernel Failure to compile References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 0.69 In-Reply-To: ; from Simon Shapiro on Thu, Oct 30, 1997 at 11:16:11PM -0800 Reply-To: John-Mark Gurney Organization: Cu Networking X-Operating-System: FreeBSD 2.2.1-RELEASE i386 X-PGP-Fingerprint: B7 EC EF F8 AE ED A7 31 96 7A 22 B3 D8 56 36 F4 X-Files: The truth is out there X-URL: http://resnet.uoregon.edu/~gurney_j/ Sender: owner-freebsd-current@FreeBSD.ORG X-Loop: FreeBSD.org Precedence: bulk Simon Shapiro scribbled this message on Oct 30: > While /usr/src/sys/i386/include/lock.h says: > > #if !defined(SIMPLELOCK_DEBUG) && NCPUS > 1 > /* > * This set of defines turns on the real functions in i386/isa/apic_ipl.s. > */ > #define simple_lock_init(alp) s_lock_init(alp) > #define simple_lock(alp) s_lock(alp) > #define simple_lock_try(alp) s_lock_try(alp) > #define simple_unlock(alp) s_unlock(alp) > > #endif /* !SIMPLELOCK_DEBUG && NCPUS > 1 */ > > So, if we debug simple locks or have only one CPU, what defines these > symbols? I hate to ask you, but could you use grep a bit more?? here is how I found out where these symbols are defined: $ gren ^simple_lock_init kern/* kern_lock.c:simple_lock_init(alp) $ vi kern/kern_lock.c /^simple_lock_init see that a few lines further down is: void _simple_lock(alp, id, l) struct simplelock *alp; then I do: $ grep _simple_lock sys/* lock.h:int _simple_lock_try __P((struct simplelock *alp, const char *, int)); lock.h:#define simple_lock_try(alp) _simple_lock_try(alp, __FILE__, __LINE__) lock.h:void _simple_lock __P((struct simplelock *alp, const char *, int)); lock.h:#define simple_lock(alp) _simple_lock(alp, __FILE__, __LINE__) proc.h: short p_simple_locks; /* DEBUG: count of held simple locks */ the above took me maybe a minute... and composing this message took about five... -- John-Mark Gurney Modem/FAX: +1 541 683 6954 Cu Networking Live in Peace, destroy Micro$oft, support free software, run FreeBSD