cvs commit: src/sys/kern kern_mutex.c

Scott Long scottl at samsco.org
Fri Sep 2 13:57:44 PDT 2005


John Baldwin wrote:
> jhb         2005-09-02 20:21:49 UTC
> 
>   FreeBSD src repository
> 
>   Modified files:
>     sys/kern             kern_mutex.c 
>   Log:
>   - Add an assertion to panic if one tries to call mtx_trylock() on a spin
>     mutex.

Explaining exactly why this is bad, either in a commit log, in a
manpage, or in source code comments would be really nice.  The pitfalls
are not immediately obvious to the casual observer.

>   - Don't panic if a spin lock is held too long inside _mtx_lock_spin() if
>     panicstr is set (meaning that we are already in a panic).  Just keep
>     spinning forever instead.

If panicstr is set, shouldn't all CPUs have already been sent an NMI?
This seems like a step backwards in reliability.

Scott


More information about the cvs-all mailing list