kern_rmlock.c (173733) | kern_rmlock.c (182914) |
---|---|
1/*- 2 * Copyright (c) 2007 Stephan Uphoff <ups@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) 2007 Stephan Uphoff <ups@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_rmlock.c 173733 2007-11-18 14:43:53Z attilio $"); | 35__FBSDID("$FreeBSD: head/sys/kern/kern_rmlock.c 182914 2008-09-10 19:13:30Z jhb $"); |
36 37#include "opt_ddb.h" 38 39#include <sys/param.h> 40#include <sys/systm.h> 41 42#include <sys/kernel.h> 43#include <sys/ktr.h> --- 384 unchanged lines hidden (view full) --- 428 429#ifdef LOCK_DEBUG 430 431void _rm_wlock_debug(struct rmlock *rm, const char *file, int line) 432{ 433 434 435 WITNESS_CHECKORDER(&rm->lock_object, LOP_NEWORDER | LOP_EXCLUSIVE, | 36 37#include "opt_ddb.h" 38 39#include <sys/param.h> 40#include <sys/systm.h> 41 42#include <sys/kernel.h> 43#include <sys/ktr.h> --- 384 unchanged lines hidden (view full) --- 428 429#ifdef LOCK_DEBUG 430 431void _rm_wlock_debug(struct rmlock *rm, const char *file, int line) 432{ 433 434 435 WITNESS_CHECKORDER(&rm->lock_object, LOP_NEWORDER | LOP_EXCLUSIVE, |
436 file, line); | 436 file, line, NULL); |
437 438 _rm_wlock(rm); 439 440 LOCK_LOG_LOCK("RMWLOCK", &rm->lock_object, 0, 0, file, line); 441 442 WITNESS_LOCK(&rm->lock_object, LOP_EXCLUSIVE, file, line); 443 444 curthread->td_locks++; --- 10 unchanged lines hidden (view full) --- 455 456 457void 458_rm_rlock_debug(struct rmlock *rm, struct rm_priotracker *tracker, 459 const char *file, int line) 460{ 461 462 | 437 438 _rm_wlock(rm); 439 440 LOCK_LOG_LOCK("RMWLOCK", &rm->lock_object, 0, 0, file, line); 441 442 WITNESS_LOCK(&rm->lock_object, LOP_EXCLUSIVE, file, line); 443 444 curthread->td_locks++; --- 10 unchanged lines hidden (view full) --- 455 456 457void 458_rm_rlock_debug(struct rmlock *rm, struct rm_priotracker *tracker, 459 const char *file, int line) 460{ 461 462 |
463 WITNESS_CHECKORDER(&rm->lock_object, LOP_NEWORDER , file, line); | 463 WITNESS_CHECKORDER(&rm->lock_object, LOP_NEWORDER , file, line, NULL); |
464 465 _rm_rlock(rm, tracker); 466 467 LOCK_LOG_LOCK("RMRLOCK", &rm->lock_object, 0, 0, file, line); 468 469 WITNESS_LOCK(&rm->lock_object, 0 , file, line); 470 471 curthread->td_locks++; --- 45 unchanged lines hidden --- | 464 465 _rm_rlock(rm, tracker); 466 467 LOCK_LOG_LOCK("RMRLOCK", &rm->lock_object, 0, 0, file, line); 468 469 WITNESS_LOCK(&rm->lock_object, 0 , file, line); 470 471 curthread->td_locks++; --- 45 unchanged lines hidden --- |