stats.c (7c478bd9) | stats.c (7aec1d6e) |
---|---|
1/* 2 * CDDL HEADER START 3 * 4 * The contents of this file are subject to the terms of the 5 * Common Development and Distribution License, Version 1.0 only 6 * (the "License"). You may not use this file except in compliance 7 * with the License. 8 * --- 6 unchanged lines hidden (view full) --- 15 * file and include the License file at usr/src/OPENSOLARIS.LICENSE. 16 * If applicable, add the following below this CDDL HEADER, with the 17 * fields enclosed by brackets "[]" replaced with your own identifying 18 * information: Portions Copyright [yyyy] [name of copyright owner] 19 * 20 * CDDL HEADER END 21 */ 22/* | 1/* 2 * CDDL HEADER START 3 * 4 * The contents of this file are subject to the terms of the 5 * Common Development and Distribution License, Version 1.0 only 6 * (the "License"). You may not use this file except in compliance 7 * with the License. 8 * --- 6 unchanged lines hidden (view full) --- 15 * file and include the License file at usr/src/OPENSOLARIS.LICENSE. 16 * If applicable, add the following below this CDDL HEADER, with the 17 * fields enclosed by brackets "[]" replaced with your own identifying 18 * information: Portions Copyright [yyyy] [name of copyright owner] 19 * 20 * CDDL HEADER END 21 */ 22/* |
23 * Copyright 2004 Sun Microsystems, Inc. All rights reserved. | 23 * Copyright 2006 Sun Microsystems, Inc. All rights reserved. |
24 * Use is subject to license terms. 25 * 26 * stats.c -- simple stats tracking table module 27 * 28 */ 29 30#pragma ident "%Z%%M% %I% %E% SMI" 31 --- 116 unchanged lines hidden (view full) --- 148 if (sp == NULL) 149 return; 150 151 ASSERT(sp->t == STATS_COUNTER); 152 153 sp->u.counter += n; 154} 155 | 24 * Use is subject to license terms. 25 * 26 * stats.c -- simple stats tracking table module 27 * 28 */ 29 30#pragma ident "%Z%%M% %I% %E% SMI" 31 --- 116 unchanged lines hidden (view full) --- 148 if (sp == NULL) 149 return; 150 151 ASSERT(sp->t == STATS_COUNTER); 152 153 sp->u.counter += n; 154} 155 |
156void 157stats_counter_reset(struct stats *sp) 158{ 159 if (sp == NULL) 160 return; 161 162 ASSERT(sp->t == STATS_COUNTER); 163 164 sp->u.counter = 0; 165} 166 |
|
156int 157stats_counter_value(struct stats *sp) 158{ 159 if (sp == NULL) 160 return (0); 161 162 ASSERT(sp->t == STATS_COUNTER); 163 --- 90 unchanged lines hidden --- | 167int 168stats_counter_value(struct stats *sp) 169{ 170 if (sp == NULL) 171 return (0); 172 173 ASSERT(sp->t == STATS_COUNTER); 174 --- 90 unchanged lines hidden --- |