kern_mutex.c (242395) | kern_mutex.c (244582) |
---|---|
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. --- 20 unchanged lines hidden (view full) --- 29 * and BSDI $Id: synch_machdep.c,v 2.3.2.39 2000/04/27 03:10:25 cp Exp $ 30 */ 31 32/* 33 * Machine independent bits of mutex implementation. 34 */ 35 36#include <sys/cdefs.h> | 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. --- 20 unchanged lines hidden (view full) --- 29 * and BSDI $Id: synch_machdep.c,v 2.3.2.39 2000/04/27 03:10:25 cp Exp $ 30 */ 31 32/* 33 * Machine independent bits of mutex implementation. 34 */ 35 36#include <sys/cdefs.h> |
37__FBSDID("$FreeBSD: head/sys/kern/kern_mutex.c 242395 2012-10-31 13:38:56Z attilio $"); | 37__FBSDID("$FreeBSD: head/sys/kern/kern_mutex.c 244582 2012-12-22 09:37:34Z attilio $"); |
38 39#include "opt_adaptive_mutexes.h" 40#include "opt_ddb.h" 41#include "opt_global.h" 42#include "opt_hwpmc_hooks.h" 43#include "opt_kdtrace.h" 44#include "opt_sched.h" 45 --- 159 unchanged lines hidden (view full) --- 205{ 206 struct mtx *m; 207 208 if (SCHEDULER_STOPPED()) 209 return; 210 211 m = mtxlock2mtx(c); 212 | 38 39#include "opt_adaptive_mutexes.h" 40#include "opt_ddb.h" 41#include "opt_global.h" 42#include "opt_hwpmc_hooks.h" 43#include "opt_kdtrace.h" 44#include "opt_sched.h" 45 --- 159 unchanged lines hidden (view full) --- 205{ 206 struct mtx *m; 207 208 if (SCHEDULER_STOPPED()) 209 return; 210 211 m = mtxlock2mtx(c); 212 |
213 KASSERT(!TD_IS_IDLETHREAD(curthread), | 213 KASSERT(kdb_active != 0 || !TD_IS_IDLETHREAD(curthread), |
214 ("mtx_lock() by idle thread %p on sleep mutex %s @ %s:%d", 215 curthread, m->lock_object.lo_name, file, line)); 216 KASSERT(m->mtx_lock != MTX_DESTROYED, 217 ("mtx_lock() of destroyed mutex @ %s:%d", file, line)); 218 KASSERT(LOCK_CLASS(&m->lock_object) == &lock_class_mtx_sleep, 219 ("mtx_lock() of spin mutex %s @ %s:%d", m->lock_object.lo_name, 220 file, line)); 221 WITNESS_CHECKORDER(&m->lock_object, opts | LOP_NEWORDER | LOP_EXCLUSIVE, --- 99 unchanged lines hidden (view full) --- 321#endif 322 int rval; 323 324 if (SCHEDULER_STOPPED()) 325 return (1); 326 327 m = mtxlock2mtx(c); 328 | 214 ("mtx_lock() by idle thread %p on sleep mutex %s @ %s:%d", 215 curthread, m->lock_object.lo_name, file, line)); 216 KASSERT(m->mtx_lock != MTX_DESTROYED, 217 ("mtx_lock() of destroyed mutex @ %s:%d", file, line)); 218 KASSERT(LOCK_CLASS(&m->lock_object) == &lock_class_mtx_sleep, 219 ("mtx_lock() of spin mutex %s @ %s:%d", m->lock_object.lo_name, 220 file, line)); 221 WITNESS_CHECKORDER(&m->lock_object, opts | LOP_NEWORDER | LOP_EXCLUSIVE, --- 99 unchanged lines hidden (view full) --- 321#endif 322 int rval; 323 324 if (SCHEDULER_STOPPED()) 325 return (1); 326 327 m = mtxlock2mtx(c); 328 |
329 KASSERT(!TD_IS_IDLETHREAD(curthread), | 329 KASSERT(kdb_active != 0 || !TD_IS_IDLETHREAD(curthread), |
330 ("mtx_trylock() by idle thread %p on sleep mutex %s @ %s:%d", 331 curthread, m->lock_object.lo_name, file, line)); 332 KASSERT(m->mtx_lock != MTX_DESTROYED, 333 ("mtx_trylock() of destroyed mutex @ %s:%d", file, line)); 334 KASSERT(LOCK_CLASS(&m->lock_object) == &lock_class_mtx_sleep, 335 ("mtx_trylock() of spin mutex %s @ %s:%d", m->lock_object.lo_name, 336 file, line)); 337 --- 664 unchanged lines hidden --- | 330 ("mtx_trylock() by idle thread %p on sleep mutex %s @ %s:%d", 331 curthread, m->lock_object.lo_name, file, line)); 332 KASSERT(m->mtx_lock != MTX_DESTROYED, 333 ("mtx_trylock() of destroyed mutex @ %s:%d", file, line)); 334 KASSERT(LOCK_CLASS(&m->lock_object) == &lock_class_mtx_sleep, 335 ("mtx_trylock() of spin mutex %s @ %s:%d", m->lock_object.lo_name, 336 file, line)); 337 --- 664 unchanged lines hidden --- |