kern_lock.c (173600) | kern_lock.c (173733) |
---|---|
1/*- 2 * Copyright (c) 1995 3 * The Regents of the University of California. All rights reserved. 4 * 5 * Copyright (C) 1997 6 * John S. Dyson. All rights reserved. 7 * 8 * This code contains ideas from software contributed to Berkeley by --- 27 unchanged lines hidden (view full) --- 36 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 37 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 38 * SUCH DAMAGE. 39 * 40 * @(#)kern_lock.c 8.18 (Berkeley) 5/21/95 41 */ 42 43#include <sys/cdefs.h> | 1/*- 2 * Copyright (c) 1995 3 * The Regents of the University of California. All rights reserved. 4 * 5 * Copyright (C) 1997 6 * John S. Dyson. All rights reserved. 7 * 8 * This code contains ideas from software contributed to Berkeley by --- 27 unchanged lines hidden (view full) --- 36 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 37 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 38 * SUCH DAMAGE. 39 * 40 * @(#)kern_lock.c 8.18 (Berkeley) 5/21/95 41 */ 42 43#include <sys/cdefs.h> |
44__FBSDID("$FreeBSD: head/sys/kern/kern_lock.c 173600 2007-11-14 06:21:24Z julian $"); | 44__FBSDID("$FreeBSD: head/sys/kern/kern_lock.c 173733 2007-11-18 14:43:53Z attilio $"); |
45 46#include "opt_ddb.h" 47#include "opt_global.h" 48 49#include <sys/param.h> 50#include <sys/kdb.h> 51#include <sys/kernel.h> 52#include <sys/ktr.h> 53#include <sys/lock.h> 54#include <sys/lockmgr.h> 55#include <sys/mutex.h> 56#include <sys/proc.h> 57#include <sys/systm.h> 58#include <sys/lock_profile.h> 59#ifdef DEBUG_LOCKS 60#include <sys/stack.h> 61#endif 62 | 45 46#include "opt_ddb.h" 47#include "opt_global.h" 48 49#include <sys/param.h> 50#include <sys/kdb.h> 51#include <sys/kernel.h> 52#include <sys/ktr.h> 53#include <sys/lock.h> 54#include <sys/lockmgr.h> 55#include <sys/mutex.h> 56#include <sys/proc.h> 57#include <sys/systm.h> 58#include <sys/lock_profile.h> 59#ifdef DEBUG_LOCKS 60#include <sys/stack.h> 61#endif 62 |
63static void assert_lockmgr(struct lock_object *lock, int what); |
|
63#ifdef DDB 64#include <ddb/ddb.h> 65static void db_show_lockmgr(struct lock_object *lock); 66#endif 67static void lock_lockmgr(struct lock_object *lock, int how); 68static int unlock_lockmgr(struct lock_object *lock); 69 70struct lock_class lock_class_lockmgr = { 71 .lc_name = "lockmgr", 72 .lc_flags = LC_SLEEPLOCK | LC_SLEEPABLE | LC_RECURSABLE | LC_UPGRADABLE, | 64#ifdef DDB 65#include <ddb/ddb.h> 66static void db_show_lockmgr(struct lock_object *lock); 67#endif 68static void lock_lockmgr(struct lock_object *lock, int how); 69static int unlock_lockmgr(struct lock_object *lock); 70 71struct lock_class lock_class_lockmgr = { 72 .lc_name = "lockmgr", 73 .lc_flags = LC_SLEEPLOCK | LC_SLEEPABLE | LC_RECURSABLE | LC_UPGRADABLE, |
74 .lc_assert = assert_lockmgr, |
|
73#ifdef DDB 74 .lc_ddb_show = db_show_lockmgr, 75#endif 76 .lc_lock = lock_lockmgr, 77 .lc_unlock = unlock_lockmgr, 78}; 79 80/* 81 * Locking primitives implementation. 82 * Locks provide shared/exclusive sychronization. 83 */ 84 85void | 75#ifdef DDB 76 .lc_ddb_show = db_show_lockmgr, 77#endif 78 .lc_lock = lock_lockmgr, 79 .lc_unlock = unlock_lockmgr, 80}; 81 82/* 83 * Locking primitives implementation. 84 * Locks provide shared/exclusive sychronization. 85 */ 86 87void |
88assert_lockmgr(struct lock_object *lock, int what) 89{ 90 91 panic("lockmgr locks do not support assertions"); 92} 93 94void |
|
86lock_lockmgr(struct lock_object *lock, int how) 87{ 88 89 panic("lockmgr locks do not support sleep interlocking"); 90} 91 92int 93unlock_lockmgr(struct lock_object *lock) --- 624 unchanged lines hidden --- | 95lock_lockmgr(struct lock_object *lock, int how) 96{ 97 98 panic("lockmgr locks do not support sleep interlocking"); 99} 100 101int 102unlock_lockmgr(struct lock_object *lock) --- 624 unchanged lines hidden --- |