kern_lock.c (194317) | kern_lock.c (196334) |
---|---|
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 194317 2009-06-17 01:55:42Z attilio $"); | 34__FBSDID("$FreeBSD: head/sys/kern/kern_lock.c 196334 2009-08-17 16:17:21Z attilio $"); |
35 36#include <sys/param.h> 37#include <sys/ktr.h> 38#include <sys/linker_set.h> 39#include <sys/lock.h> 40#include <sys/lock_profile.h> 41#include <sys/lockmgr.h> 42#include <sys/mutex.h> --- 286 unchanged lines hidden (view full) --- 329#endif 330 331void 332lockinit(struct lock *lk, int pri, const char *wmesg, int timo, int flags) 333{ 334 int iflags; 335 336 MPASS((flags & ~LK_INIT_MASK) == 0); | 35 36#include <sys/param.h> 37#include <sys/ktr.h> 38#include <sys/linker_set.h> 39#include <sys/lock.h> 40#include <sys/lock_profile.h> 41#include <sys/lockmgr.h> 42#include <sys/mutex.h> --- 286 unchanged lines hidden (view full) --- 329#endif 330 331void 332lockinit(struct lock *lk, int pri, const char *wmesg, int timo, int flags) 333{ 334 int iflags; 335 336 MPASS((flags & ~LK_INIT_MASK) == 0); |
337 ASSERT_ATOMIC_LOAD_PTR(lk->lk_lock, 338 ("%s: lockmgr not aligned for %s: %p", __func__, wmesg, 339 &lk->lk_lock)); |
|
337 338 iflags = LO_SLEEPABLE | LO_UPGRADABLE; 339 if (flags & LK_CANRECURSE) 340 iflags |= LO_RECURSABLE; 341 if ((flags & LK_NODUP) == 0) 342 iflags |= LO_DUPOK; 343 if (flags & LK_NOPROFILE) 344 iflags |= LO_NOPROFILE; --- 940 unchanged lines hidden --- | 340 341 iflags = LO_SLEEPABLE | LO_UPGRADABLE; 342 if (flags & LK_CANRECURSE) 343 iflags |= LO_RECURSABLE; 344 if ((flags & LK_NODUP) == 0) 345 iflags |= LO_DUPOK; 346 if (flags & LK_NOPROFILE) 347 iflags |= LO_NOPROFILE; --- 940 unchanged lines hidden --- |