kern_thread.c (169667) | kern_thread.c (170170) |
---|---|
1/*- 2 * Copyright (C) 2001 Julian Elischer <julian@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 --- 13 unchanged lines hidden (view full) --- 22 * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 23 * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 24 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 25 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH 26 * DAMAGE. 27 */ 28 29#include <sys/cdefs.h> | 1/*- 2 * Copyright (C) 2001 Julian Elischer <julian@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 --- 13 unchanged lines hidden (view full) --- 22 * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 23 * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 24 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 25 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH 26 * DAMAGE. 27 */ 28 29#include <sys/cdefs.h> |
30__FBSDID("$FreeBSD: head/sys/kern/kern_thread.c 169667 2007-05-18 07:10:50Z jeff $"); | 30__FBSDID("$FreeBSD: head/sys/kern/kern_thread.c 170170 2007-05-31 22:52:15Z attilio $"); |
31 32#include <sys/param.h> 33#include <sys/systm.h> 34#include <sys/kernel.h> 35#include <sys/lock.h> 36#include <sys/mutex.h> 37#include <sys/proc.h> 38#include <sys/resourcevar.h> --- 363 unchanged lines hidden (view full) --- 402 /* Do the same timestamp bookkeeping that mi_switch() would do. */ 403 new_switchtime = cpu_ticks(); 404 p->p_rux.rux_runtime += (new_switchtime - PCPU_GET(switchtime)); 405 p->p_rux.rux_uticks += td->td_uticks; 406 p->p_rux.rux_sticks += td->td_sticks; 407 p->p_rux.rux_iticks += td->td_iticks; 408 PCPU_SET(switchtime, new_switchtime); 409 PCPU_SET(switchticks, ticks); | 31 32#include <sys/param.h> 33#include <sys/systm.h> 34#include <sys/kernel.h> 35#include <sys/lock.h> 36#include <sys/mutex.h> 37#include <sys/proc.h> 38#include <sys/resourcevar.h> --- 363 unchanged lines hidden (view full) --- 402 /* Do the same timestamp bookkeeping that mi_switch() would do. */ 403 new_switchtime = cpu_ticks(); 404 p->p_rux.rux_runtime += (new_switchtime - PCPU_GET(switchtime)); 405 p->p_rux.rux_uticks += td->td_uticks; 406 p->p_rux.rux_sticks += td->td_sticks; 407 p->p_rux.rux_iticks += td->td_iticks; 408 PCPU_SET(switchtime, new_switchtime); 409 PCPU_SET(switchticks, ticks); |
410 VMCNT_ADD(swtch, 1); | 410 cnt.v_swtch++; |
411 412 /* Add our usage into the usage of all our children. */ 413 if (p->p_numthreads == 1) 414 ruadd(p->p_ru, &p->p_rux, &p->p_stats->p_cru, &p->p_crux); 415 416 /* 417 * The last thread is left attached to the process 418 * So that the whole bundle gets recycled. Skip --- 513 unchanged lines hidden --- | 411 412 /* Add our usage into the usage of all our children. */ 413 if (p->p_numthreads == 1) 414 ruadd(p->p_ru, &p->p_rux, &p->p_stats->p_cru, &p->p_crux); 415 416 /* 417 * The last thread is left attached to the process 418 * So that the whole bundle gets recycled. Skip --- 513 unchanged lines hidden --- |