subr_turnstile.c (139453) | subr_turnstile.c (141616) |
---|---|
1/*- 2 * Copyright (c) 1998 Berkeley Software Design, Inc. All rights reserved. 3 * 4 * Redistribution and use in source and binary forms, with or without 5 * modification, are permitted provided that the following conditions 6 * are met: 7 * 1. Redistributions of source code must retain the above copyright 8 * notice, this list of conditions and the following disclaimer. --- 45 unchanged lines hidden (view full) --- 54 * if there are any other waiters. If it is the only thread blocked on the 55 * lock, then it reclaims the turnstile associated with the lock and removes 56 * it from the hash table. 57 */ 58 59#include "opt_turnstile_profiling.h" 60 61#include <sys/cdefs.h> | 1/*- 2 * Copyright (c) 1998 Berkeley Software Design, Inc. All rights reserved. 3 * 4 * Redistribution and use in source and binary forms, with or without 5 * modification, are permitted provided that the following conditions 6 * are met: 7 * 1. Redistributions of source code must retain the above copyright 8 * notice, this list of conditions and the following disclaimer. --- 45 unchanged lines hidden (view full) --- 54 * if there are any other waiters. If it is the only thread blocked on the 55 * lock, then it reclaims the turnstile associated with the lock and removes 56 * it from the hash table. 57 */ 58 59#include "opt_turnstile_profiling.h" 60 61#include <sys/cdefs.h> |
62__FBSDID("$FreeBSD: head/sys/kern/subr_turnstile.c 139453 2004-12-30 20:52:44Z jhb $"); | 62__FBSDID("$FreeBSD: head/sys/kern/subr_turnstile.c 141616 2005-02-10 12:02:37Z phk $"); |
63 64#include <sys/param.h> 65#include <sys/systm.h> 66#include <sys/kernel.h> 67#include <sys/ktr.h> 68#include <sys/lock.h> 69#include <sys/malloc.h> 70#include <sys/mutex.h> --- 60 unchanged lines hidden (view full) --- 131SYSCTL_NODE(_debug_turnstile, OID_AUTO, chains, CTLFLAG_RD, 0, 132 "turnstile chain stats"); 133SYSCTL_UINT(_debug_turnstile, OID_AUTO, max_depth, CTLFLAG_RD, 134 &turnstile_max_depth, 0, "maxmimum depth achieved of a single chain"); 135#endif 136static struct mtx td_contested_lock; 137static struct turnstile_chain turnstile_chains[TC_TABLESIZE]; 138 | 63 64#include <sys/param.h> 65#include <sys/systm.h> 66#include <sys/kernel.h> 67#include <sys/ktr.h> 68#include <sys/lock.h> 69#include <sys/malloc.h> 70#include <sys/mutex.h> --- 60 unchanged lines hidden (view full) --- 131SYSCTL_NODE(_debug_turnstile, OID_AUTO, chains, CTLFLAG_RD, 0, 132 "turnstile chain stats"); 133SYSCTL_UINT(_debug_turnstile, OID_AUTO, max_depth, CTLFLAG_RD, 134 &turnstile_max_depth, 0, "maxmimum depth achieved of a single chain"); 135#endif 136static struct mtx td_contested_lock; 137static struct turnstile_chain turnstile_chains[TC_TABLESIZE]; 138 |
139MALLOC_DEFINE(M_TURNSTILE, "turnstiles", "turnstiles"); | 139static MALLOC_DEFINE(M_TURNSTILE, "turnstiles", "turnstiles"); |
140 141/* 142 * Prototypes for non-exported routines. 143 */ 144static void init_turnstile0(void *dummy); 145#ifdef TURNSTILE_PROFILING 146static void init_turnstile_profiling(void *arg); 147#endif --- 704 unchanged lines hidden --- | 140 141/* 142 * Prototypes for non-exported routines. 143 */ 144static void init_turnstile0(void *dummy); 145#ifdef TURNSTILE_PROFILING 146static void init_turnstile_profiling(void *arg); 147#endif --- 704 unchanged lines hidden --- |