Awsome! Now go port WITNESS :)
On Fri, Sep 24, 2010 at 07:21:30AM -0600, Matthew Dempsky wrote: > CVSROOT: /cvs > Module name: src > Changes by: matt...@cvs.openbsd.org 2010/09/24 07:21:30 > > Modified files: > sys/arch/amd64/amd64: genassym.cf mutex.S > sys/arch/amd64/include: cpu.h > sys/arch/i386/i386: genassym.cf mutex.S > sys/arch/i386/include: cpu.h > sys/kern : kern_rwlock.c sched_bsd.c subr_xxx.c > sys/sys : rwlock.h > > Log message: > Add stricter asserts to DIAGNOSTIC kernels to help catch mutex and > rwlock misuse. In particular, this commit makes the following > changes: > > 1. i386 and amd64 now count the number of active mutexes so that > assertwaitok(9) can detect attempts to sleep while holding a mutex. > > 2. i386 and amd64 check that we actually hold mutexes when passed to > mtx_leave(). > > 3. Calls to rw_exit*() now call rw_assert_{rd,wr}lock() as > appropriate. > > ok krw@, oga@; "sounds good to me" deraadt@; assembly bits double > checked by pirofti@