kern_rwlock.c (197643) | kern_rwlock.c (205626) |
---|---|
1/*- 2 * Copyright (c) 2006 John Baldwin <jhb@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 * SUCH DAMAGE. 28 */ 29 30/* 31 * Machine independent bits of reader/writer lock implementation. 32 */ 33 34#include <sys/cdefs.h> | 1/*- 2 * Copyright (c) 2006 John Baldwin <jhb@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 * SUCH DAMAGE. 28 */ 29 30/* 31 * Machine independent bits of reader/writer lock implementation. 32 */ 33 34#include <sys/cdefs.h> |
35__FBSDID("$FreeBSD: head/sys/kern/kern_rwlock.c 197643 2009-09-30 13:26:31Z attilio $"); | 35__FBSDID("$FreeBSD: head/sys/kern/kern_rwlock.c 205626 2010-03-24 19:21:26Z bz $"); |
36 37#include "opt_ddb.h" 38#include "opt_kdtrace.h" 39#include "opt_no_adaptive_rwlocks.h" 40 41#include <sys/param.h> 42#include <sys/ktr.h> 43#include <sys/kernel.h> --- 150 unchanged lines hidden (view full) --- 194 rw->rw_recurse = 0; 195 lock_init(&rw->lock_object, &lock_class_rw, name, NULL, flags); 196} 197 198void 199rw_destroy(struct rwlock *rw) 200{ 201 | 36 37#include "opt_ddb.h" 38#include "opt_kdtrace.h" 39#include "opt_no_adaptive_rwlocks.h" 40 41#include <sys/param.h> 42#include <sys/ktr.h> 43#include <sys/kernel.h> --- 150 unchanged lines hidden (view full) --- 194 rw->rw_recurse = 0; 195 lock_init(&rw->lock_object, &lock_class_rw, name, NULL, flags); 196} 197 198void 199rw_destroy(struct rwlock *rw) 200{ 201 |
202 KASSERT(rw->rw_lock == RW_UNLOCKED, ("rw lock not unlocked")); 203 KASSERT(rw->rw_recurse == 0, ("rw lock still recursed")); | 202 KASSERT(rw->rw_lock == RW_UNLOCKED, ("rw lock %p not unlocked", rw)); 203 KASSERT(rw->rw_recurse == 0, ("rw lock %p still recursed", rw)); |
204 rw->rw_lock = RW_DESTROYED; 205 lock_destroy(&rw->lock_object); 206} 207 208void 209rw_sysinit(void *arg) 210{ 211 struct rw_args *args = arg; --- 915 unchanged lines hidden --- | 204 rw->rw_lock = RW_DESTROYED; 205 lock_destroy(&rw->lock_object); 206} 207 208void 209rw_sysinit(void *arg) 210{ 211 struct rw_args *args = arg; --- 915 unchanged lines hidden --- |