kern_lock.c (227588) | kern_lock.c (228424) |
---|---|
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 --- 17 unchanged lines hidden (view full) --- 26 * DAMAGE. 27 */ 28 29#include "opt_adaptive_lockmgrs.h" 30#include "opt_ddb.h" 31#include "opt_kdtrace.h" 32 33#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 --- 17 unchanged lines hidden (view full) --- 26 * DAMAGE. 27 */ 28 29#include "opt_adaptive_lockmgrs.h" 30#include "opt_ddb.h" 31#include "opt_kdtrace.h" 32 33#include <sys/cdefs.h> |
34__FBSDID("$FreeBSD: head/sys/kern/kern_lock.c 227588 2011-11-16 21:51:17Z pjd $"); | 34__FBSDID("$FreeBSD: head/sys/kern/kern_lock.c 228424 2011-12-11 21:02:01Z avg $"); |
35 36#include <sys/param.h> 37#include <sys/ktr.h> 38#include <sys/lock.h> 39#include <sys/lock_profile.h> 40#include <sys/lockmgr.h> 41#include <sys/mutex.h> 42#include <sys/proc.h> --- 1184 unchanged lines hidden (view full) --- 1227 return (error); 1228} 1229 1230void 1231_lockmgr_disown(struct lock *lk, const char *file, int line) 1232{ 1233 uintptr_t tid, x; 1234 | 35 36#include <sys/param.h> 37#include <sys/ktr.h> 38#include <sys/lock.h> 39#include <sys/lock_profile.h> 40#include <sys/lockmgr.h> 41#include <sys/mutex.h> 42#include <sys/proc.h> --- 1184 unchanged lines hidden (view full) --- 1227 return (error); 1228} 1229 1230void 1231_lockmgr_disown(struct lock *lk, const char *file, int line) 1232{ 1233 uintptr_t tid, x; 1234 |
1235 if (SCHEDULER_STOPPED()) 1236 return; 1237 |
|
1235 tid = (uintptr_t)curthread; 1236 _lockmgr_assert(lk, KA_XLOCKED | KA_NOTRECURSED, file, line); 1237 1238 /* 1239 * If the owner is already LK_KERNPROC just skip the whole operation. 1240 */ 1241 if (LK_HOLDER(lk->lk_lock) != tid) 1242 return; --- 217 unchanged lines hidden --- | 1238 tid = (uintptr_t)curthread; 1239 _lockmgr_assert(lk, KA_XLOCKED | KA_NOTRECURSED, file, line); 1240 1241 /* 1242 * If the owner is already LK_KERNPROC just skip the whole operation. 1243 */ 1244 if (LK_HOLDER(lk->lk_lock) != tid) 1245 return; --- 217 unchanged lines hidden --- |