kern_lock.c (243900) | kern_lock.c (244582) |
---|---|
1/*- 2 * Copyright (c) 2008 Attilio Rao <attilio@FreeBSD.org> 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 18 unchanged lines hidden (view full) --- 27 */ 28 29#include "opt_adaptive_lockmgrs.h" 30#include "opt_ddb.h" 31#include "opt_hwpmc_hooks.h" 32#include "opt_kdtrace.h" 33 34#include <sys/cdefs.h> | 1/*- 2 * Copyright (c) 2008 Attilio Rao <attilio@FreeBSD.org> 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 18 unchanged lines hidden (view full) --- 27 */ 28 29#include "opt_adaptive_lockmgrs.h" 30#include "opt_ddb.h" 31#include "opt_hwpmc_hooks.h" 32#include "opt_kdtrace.h" 33 34#include <sys/cdefs.h> |
35__FBSDID("$FreeBSD: head/sys/kern/kern_lock.c 243900 2012-12-05 15:11:01Z attilio $"); | 35__FBSDID("$FreeBSD: head/sys/kern/kern_lock.c 244582 2012-12-22 09:37:34Z attilio $"); |
36 37#include <sys/param.h> | 36 37#include <sys/param.h> |
38#include <sys/kdb.h> |
|
38#include <sys/ktr.h> 39#include <sys/lock.h> 40#include <sys/lock_profile.h> 41#include <sys/lockmgr.h> 42#include <sys/mutex.h> 43#include <sys/proc.h> 44#include <sys/sleepqueue.h> 45#ifdef DEBUG_LOCKS --- 426 unchanged lines hidden (view full) --- 472 ("%s: Invalid requested operation @ %s:%d", __func__, file, line)); 473 KASSERT((flags & (LK_NOWAIT | LK_SLEEPFAIL)) == 0 || 474 (op != LK_DOWNGRADE && op != LK_RELEASE), 475 ("%s: Invalid flags in regard of the operation desired @ %s:%d", 476 __func__, file, line)); 477 KASSERT((flags & LK_INTERLOCK) == 0 || ilk != NULL, 478 ("%s: LK_INTERLOCK passed without valid interlock @ %s:%d", 479 __func__, file, line)); | 39#include <sys/ktr.h> 40#include <sys/lock.h> 41#include <sys/lock_profile.h> 42#include <sys/lockmgr.h> 43#include <sys/mutex.h> 44#include <sys/proc.h> 45#include <sys/sleepqueue.h> 46#ifdef DEBUG_LOCKS --- 426 unchanged lines hidden (view full) --- 473 ("%s: Invalid requested operation @ %s:%d", __func__, file, line)); 474 KASSERT((flags & (LK_NOWAIT | LK_SLEEPFAIL)) == 0 || 475 (op != LK_DOWNGRADE && op != LK_RELEASE), 476 ("%s: Invalid flags in regard of the operation desired @ %s:%d", 477 __func__, file, line)); 478 KASSERT((flags & LK_INTERLOCK) == 0 || ilk != NULL, 479 ("%s: LK_INTERLOCK passed without valid interlock @ %s:%d", 480 __func__, file, line)); |
480 KASSERT(!TD_IS_IDLETHREAD(curthread), | 481 KASSERT(kdb_active != 0 || !TD_IS_IDLETHREAD(curthread), |
481 ("%s: idle thread %p on lockmgr %s @ %s:%d", __func__, curthread, 482 lk->lock_object.lo_name, file, line)); 483 484 class = (flags & LK_INTERLOCK) ? LOCK_CLASS(ilk) : NULL; 485 if (panicstr != NULL) { 486 if (flags & LK_INTERLOCK) 487 class->lc_unlock(ilk); 488 return (0); --- 1010 unchanged lines hidden --- | 482 ("%s: idle thread %p on lockmgr %s @ %s:%d", __func__, curthread, 483 lk->lock_object.lo_name, file, line)); 484 485 class = (flags & LK_INTERLOCK) ? LOCK_CLASS(ilk) : NULL; 486 if (panicstr != NULL) { 487 if (flags & LK_INTERLOCK) 488 class->lc_unlock(ilk); 489 return (0); --- 1010 unchanged lines hidden --- |