subr_witness.c (90361) | subr_witness.c (91140) |
---|---|
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 90361 2002-02-07 20:58:47Z julian $ | 30 * $FreeBSD: head/sys/kern/subr_witness.c 91140 2002-02-23 11:12:57Z tanimura $ |
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 --- 144 unchanged lines hidden (view full) --- 183static int witness_dead; /* fatal error, probably no memory */ 184 185static struct witness w_data[WITNESS_COUNT]; 186static struct witness_child_list_entry w_childdata[WITNESS_CHILDCOUNT]; 187static struct lock_list_entry w_locklistdata[LOCK_CHILDCOUNT]; 188 189static struct witness_order_list_entry order_lists[] = { 190 { "Giant", &lock_class_mtx_sleep }, | 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 --- 144 unchanged lines hidden (view full) --- 183static int witness_dead; /* fatal error, probably no memory */ 184 185static struct witness w_data[WITNESS_COUNT]; 186static struct witness_child_list_entry w_childdata[WITNESS_CHILDCOUNT]; 187static struct lock_list_entry w_locklistdata[LOCK_CHILDCOUNT]; 188 189static struct witness_order_list_entry order_lists[] = { 190 { "Giant", &lock_class_mtx_sleep }, |
191 { "pgrpsess", &lock_class_sx }, |
|
191 { "proctree", &lock_class_sx }, 192 { "allproc", &lock_class_sx }, | 192 { "proctree", &lock_class_sx }, 193 { "allproc", &lock_class_sx }, |
194 { "process group", &lock_class_mtx_sleep }, |
|
193 { "process lock", &lock_class_mtx_sleep }, | 195 { "process lock", &lock_class_mtx_sleep }, |
196 { "session", &lock_class_mtx_sleep }, |
|
194 { "uidinfo hash", &lock_class_mtx_sleep }, 195 { "uidinfo struct", &lock_class_mtx_sleep }, 196 { NULL, NULL }, 197 /* 198 * spin locks 199 */ 200#ifdef SMP 201 { "ap boot", &lock_class_mtx_spin }, --- 20 unchanged lines hidden (view full) --- 222#endif 223 { "clk", &lock_class_mtx_spin }, 224 { NULL, NULL }, 225 { NULL, NULL } 226}; 227 228static const char *dup_list[] = { 229 "process lock", | 197 { "uidinfo hash", &lock_class_mtx_sleep }, 198 { "uidinfo struct", &lock_class_mtx_sleep }, 199 { NULL, NULL }, 200 /* 201 * spin locks 202 */ 203#ifdef SMP 204 { "ap boot", &lock_class_mtx_spin }, --- 20 unchanged lines hidden (view full) --- 225#endif 226 { "clk", &lock_class_mtx_spin }, 227 { NULL, NULL }, 228 { NULL, NULL } 229}; 230 231static const char *dup_list[] = { 232 "process lock", |
233 "process group", |
|
230 NULL 231}; 232 233/* 234 * Pairs of locks which have been blessed 235 * Don't complain about order problems with blessed locks 236 */ 237static struct witness_blessed blessed_list[] = { --- 1243 unchanged lines hidden --- | 234 NULL 235}; 236 237/* 238 * Pairs of locks which have been blessed 239 * Don't complain about order problems with blessed locks 240 */ 241static struct witness_blessed blessed_list[] = { --- 1243 unchanged lines hidden --- |