subr_witness.c (112562) | subr_witness.c (112993) |
---|---|
1/*- 2 * Copyright (c) 1998 Berkeley Software Design, Inc. All rights reserved. 3 * 4 * Redistribution and use in source and binary forms, with or without 5 * modification, are permitted provided that the following conditions 6 * are met: 7 * 1. Redistributions of source code must retain the above copyright 8 * notice, this list of conditions and the following disclaimer. --- 13 unchanged lines hidden (view full) --- 22 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 23 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 24 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 25 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 26 * SUCH DAMAGE. 27 * 28 * from BSDI $Id: mutex_witness.c,v 1.1.2.20 2000/04/27 03:10:27 cp Exp $ 29 * and BSDI $Id: synch_machdep.c,v 2.3.2.39 2000/04/27 03:10:25 cp Exp $ | 1/*- 2 * Copyright (c) 1998 Berkeley Software Design, Inc. All rights reserved. 3 * 4 * Redistribution and use in source and binary forms, with or without 5 * modification, are permitted provided that the following conditions 6 * are met: 7 * 1. Redistributions of source code must retain the above copyright 8 * notice, this list of conditions and the following disclaimer. --- 13 unchanged lines hidden (view full) --- 22 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 23 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 24 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 25 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 26 * SUCH DAMAGE. 27 * 28 * from BSDI $Id: mutex_witness.c,v 1.1.2.20 2000/04/27 03:10:27 cp Exp $ 29 * and BSDI $Id: synch_machdep.c,v 2.3.2.39 2000/04/27 03:10:25 cp Exp $ |
30 * $FreeBSD: head/sys/kern/subr_witness.c 112562 2003-03-24 21:03:53Z jhb $ | 30 * $FreeBSD: head/sys/kern/subr_witness.c 112993 2003-04-02 23:53:30Z peter $ |
31 */ 32 33/* 34 * Implementation of the `witness' lock verifier. Originally implemented for 35 * mutexes in BSD/OS. Extended to handle generic lock objects and lock 36 * classes in FreeBSD. 37 */ 38 --- 40 unchanged lines hidden (view full) --- 79 * acquires X and blocks on Giant. Then suppose that T2 acquires Giant and 80 * blocks on X. When T2 blocks on X, T2 will release Giant allowing T1 to 81 * execute. Thus, acquiring Giant both before and after a sleepable lock 82 * will not result in a lock order reversal. 83 */ 84 85#include "opt_ddb.h" 86#include "opt_witness.h" | 31 */ 32 33/* 34 * Implementation of the `witness' lock verifier. Originally implemented for 35 * mutexes in BSD/OS. Extended to handle generic lock objects and lock 36 * classes in FreeBSD. 37 */ 38 --- 40 unchanged lines hidden (view full) --- 79 * acquires X and blocks on Giant. Then suppose that T2 acquires Giant and 80 * blocks on X. When T2 blocks on X, T2 will release Giant allowing T1 to 81 * execute. Thus, acquiring Giant both before and after a sleepable lock 82 * will not result in a lock order reversal. 83 */ 84 85#include "opt_ddb.h" 86#include "opt_witness.h" |
87#ifdef __i386__ 88#include "opt_swtch.h" 89#endif |
|
87 88#include <sys/param.h> 89#include <sys/bus.h> 90#include <sys/kernel.h> 91#include <sys/ktr.h> 92#include <sys/lock.h> 93#include <sys/malloc.h> 94#include <sys/mutex.h> --- 195 unchanged lines hidden (view full) --- 290 { "allpmaps", &lock_class_mtx_spin }, 291 { "vm page queue free mutex", &lock_class_mtx_spin }, 292 { "icu", &lock_class_mtx_spin }, 293#ifdef SMP 294 { "smp rendezvous", &lock_class_mtx_spin }, 295#if defined(__i386__) && defined(APIC_IO) 296 { "tlb", &lock_class_mtx_spin }, 297#endif | 90 91#include <sys/param.h> 92#include <sys/bus.h> 93#include <sys/kernel.h> 94#include <sys/ktr.h> 95#include <sys/lock.h> 96#include <sys/malloc.h> 97#include <sys/mutex.h> --- 195 unchanged lines hidden (view full) --- 293 { "allpmaps", &lock_class_mtx_spin }, 294 { "vm page queue free mutex", &lock_class_mtx_spin }, 295 { "icu", &lock_class_mtx_spin }, 296#ifdef SMP 297 { "smp rendezvous", &lock_class_mtx_spin }, 298#if defined(__i386__) && defined(APIC_IO) 299 { "tlb", &lock_class_mtx_spin }, 300#endif |
301#if defined(__i386__) && defined(LAZY_SWITCH) 302 { "lazypmap", &lock_class_mtx_spin }, 303#endif |
|
298#ifdef __sparc64__ 299 { "ipi", &lock_class_mtx_spin }, 300#endif 301#endif 302 { "clk", &lock_class_mtx_spin }, 303 { "mutex profiling lock", &lock_class_mtx_spin }, 304 { "kse zombie lock", &lock_class_mtx_spin }, 305 { "ALD Queue", &lock_class_mtx_spin }, --- 1451 unchanged lines hidden --- | 304#ifdef __sparc64__ 305 { "ipi", &lock_class_mtx_spin }, 306#endif 307#endif 308 { "clk", &lock_class_mtx_spin }, 309 { "mutex profiling lock", &lock_class_mtx_spin }, 310 { "kse zombie lock", &lock_class_mtx_spin }, 311 { "ALD Queue", &lock_class_mtx_spin }, --- 1451 unchanged lines hidden --- |