kern_resource.c (208488) | kern_resource.c (209390) |
---|---|
1/*- 2 * Copyright (c) 1982, 1986, 1991, 1993 3 * The Regents of the University of California. All rights reserved. 4 * (c) UNIX System Laboratories, Inc. 5 * All or some portions of this file are derived from material licensed 6 * to the University of California by American Telephone and Telegraph 7 * Co. or Unix System Laboratories, Inc. and are reproduced herein with 8 * the permission of UNIX System Laboratories, Inc. --- 21 unchanged lines hidden (view full) --- 30 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 31 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 32 * SUCH DAMAGE. 33 * 34 * @(#)kern_resource.c 8.5 (Berkeley) 1/21/94 35 */ 36 37#include <sys/cdefs.h> | 1/*- 2 * Copyright (c) 1982, 1986, 1991, 1993 3 * The Regents of the University of California. All rights reserved. 4 * (c) UNIX System Laboratories, Inc. 5 * All or some portions of this file are derived from material licensed 6 * to the University of California by American Telephone and Telegraph 7 * Co. or Unix System Laboratories, Inc. and are reproduced herein with 8 * the permission of UNIX System Laboratories, Inc. --- 21 unchanged lines hidden (view full) --- 30 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 31 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 32 * SUCH DAMAGE. 33 * 34 * @(#)kern_resource.c 8.5 (Berkeley) 1/21/94 35 */ 36 37#include <sys/cdefs.h> |
38__FBSDID("$FreeBSD: head/sys/kern/kern_resource.c 208488 2010-05-24 10:23:49Z kib $"); | 38__FBSDID("$FreeBSD: head/sys/kern/kern_resource.c 209390 2010-06-21 09:55:56Z ed $"); |
39 40#include "opt_compat.h" 41 42#include <sys/param.h> 43#include <sys/systm.h> 44#include <sys/sysproto.h> 45#include <sys/file.h> 46#include <sys/kernel.h> --- 799 unchanged lines hidden (view full) --- 846 calcru1(p, &p->p_rux, up, sp); 847} 848 849static void 850calcru1(struct proc *p, struct rusage_ext *ruxp, struct timeval *up, 851 struct timeval *sp) 852{ 853 /* {user, system, interrupt, total} {ticks, usec}: */ | 39 40#include "opt_compat.h" 41 42#include <sys/param.h> 43#include <sys/systm.h> 44#include <sys/sysproto.h> 45#include <sys/file.h> 46#include <sys/kernel.h> --- 799 unchanged lines hidden (view full) --- 846 calcru1(p, &p->p_rux, up, sp); 847} 848 849static void 850calcru1(struct proc *p, struct rusage_ext *ruxp, struct timeval *up, 851 struct timeval *sp) 852{ 853 /* {user, system, interrupt, total} {ticks, usec}: */ |
854 u_int64_t ut, uu, st, su, it, tt, tu; | 854 uint64_t ut, uu, st, su, it, tt, tu; |
855 856 ut = ruxp->rux_uticks; 857 st = ruxp->rux_sticks; 858 it = ruxp->rux_iticks; 859 tt = ut + st + it; 860 if (tt == 0) { 861 /* Avoid divide by zero */ 862 st = 1; --- 519 unchanged lines hidden --- | 855 856 ut = ruxp->rux_uticks; 857 st = ruxp->rux_sticks; 858 it = ruxp->rux_iticks; 859 tt = ut + st + it; 860 if (tt == 0) { 861 /* Avoid divide by zero */ 862 st = 1; --- 519 unchanged lines hidden --- |