kern_rwlock.c (171516) | kern_rwlock.c (173600) |
---|---|
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 171516 2007-07-20 08:43:42Z attilio $"); | 35__FBSDID("$FreeBSD: head/sys/kern/kern_rwlock.c 173600 2007-11-14 06:21:24Z julian $"); |
36 37#include "opt_ddb.h" 38#include "opt_no_adaptive_rwlocks.h" 39 40#include <sys/param.h> 41#include <sys/ktr.h> 42#include <sys/lock.h> 43#include <sys/mutex.h> --- 918 unchanged lines hidden (view full) --- 962 db_printf("DESTROYED\n"); 963 return; 964 } else if (rw->rw_lock & RW_LOCK_READ) 965 db_printf("RLOCK: %ju locks\n", 966 (uintmax_t)(RW_READERS(rw->rw_lock))); 967 else { 968 td = rw_wowner(rw); 969 db_printf("WLOCK: %p (tid %d, pid %d, \"%s\")\n", td, | 36 37#include "opt_ddb.h" 38#include "opt_no_adaptive_rwlocks.h" 39 40#include <sys/param.h> 41#include <sys/ktr.h> 42#include <sys/lock.h> 43#include <sys/mutex.h> --- 918 unchanged lines hidden (view full) --- 962 db_printf("DESTROYED\n"); 963 return; 964 } else if (rw->rw_lock & RW_LOCK_READ) 965 db_printf("RLOCK: %ju locks\n", 966 (uintmax_t)(RW_READERS(rw->rw_lock))); 967 else { 968 td = rw_wowner(rw); 969 db_printf("WLOCK: %p (tid %d, pid %d, \"%s\")\n", td, |
970 td->td_tid, td->td_proc->p_pid, td->td_proc->p_comm); | 970 td->td_tid, td->td_proc->p_pid, td->td_name); |
971 if (rw_recursed(rw)) 972 db_printf(" recursed: %u\n", rw->rw_recurse); 973 } 974 db_printf(" waiters: "); 975 switch (rw->rw_lock & (RW_LOCK_READ_WAITERS | RW_LOCK_WRITE_WAITERS)) { 976 case RW_LOCK_READ_WAITERS: 977 db_printf("readers\n"); 978 break; --- 13 unchanged lines hidden --- | 971 if (rw_recursed(rw)) 972 db_printf(" recursed: %u\n", rw->rw_recurse); 973 } 974 db_printf(" waiters: "); 975 switch (rw->rw_lock & (RW_LOCK_READ_WAITERS | RW_LOCK_WRITE_WAITERS)) { 976 case RW_LOCK_READ_WAITERS: 977 db_printf("readers\n"); 978 break; --- 13 unchanged lines hidden --- |