Messages in this thread | | | From | pmenage@ensim ... | Subject | Re: spinlock assertion macros | Date | Thu, 11 Jul 2002 18:36:26 -0700 |
| |
In article <0C01A29FBAE24448A792F5C68F5EA47D2B0FDD@nasdaq.ms.ensim.com>, you write: > >MUST_NOT_HOLD is already in Jesse's patch he posted earlier today, >though I imagine it would be used rarely if at all. >
The spin_assert_unlocked() macro in Jesse's patch doesn't cope with the fact that someone else might quite legitimately have the spinlock locked. You'd need debugging spinlocks that track the owner of the spinlock, and then check in MUST_NOT_HOLD() you'd check that lock->owner != current. You'd also have to have some special non-checking lock/unlock macros to handle situations where locks are taken in non-process context or released by someone other than the original locker (does the migration code still do that?).
Paul - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| |