[prev in list] [next in list] [prev in thread] [next in thread]
List: kernel-janitors
Subject: Re: spinlock assertion macros
From: Arnd Bergmann <arnd () bergmann-dalldorf ! de>
Date: 2002-07-17 11:09:08
[Download RAW message or body]
On Wednesday 17 July 2002 04:22, Jesse Barnes wrote:
> files? Anyway, I've got spinlock and rwlock versions of them below,
> maybe they're useful enough to go in as a start? I only coded the
> ia64 version of rwlock_is_*_locked since it was easy--the i386
> versions were a little intimidating...
>
> I thought Oliver's suggestion for tracking the order of spinlock
> acquisition was good, hopefully someone will take a stab at it along
> with Dave's FUNCTION_SLEEPS() implementation.
I suppose you can simplify your interface when the code tracking the lock
holder (i.e. the address of the lock call) is there:
#define MUST_HOLD(lock) BUG_ON(!(lock)->holder)
is independent of whether lock is a spinlock or an rw_lock, so you
don't need MUST_HOLD_READ anymore. I'd even go as far as dropping
MUST_HOLD_WRITE as well, since it helps only in the corner case
where the lock is held but only for reading.
Arnd <><
-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
Kernel-janitor-discuss mailing list
Kernel-janitor-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/kernel-janitor-discuss
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic