Date: Thu, 30 Oct 1997 23:38:46 -0800 From: John-Mark Gurney <gurney_j@efn.org> To: Simon Shapiro <Shimon@i-Connect.Net> Cc: freebsd-current@FreeBSD.ORG Subject: Re: More on LINT Kernel Failure to compile Message-ID: <19971030233846.44353@hydrogen.nike.efn.org> In-Reply-To: <XFMail.971030231611.Shimon@i-Connect.Net>; from Simon Shapiro on Thu, Oct 30, 1997 at 11:16:11PM -0800 References: <XFMail.971030231611.Shimon@i-Connect.Net>
next in thread | previous in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?19971030233846.44353>