Deleted Added
full compact
kern_synch.c (159631) kern_synch.c (163709)
1/*-
2 * Copyright (c) 1982, 1986, 1990, 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_synch.c 8.9 (Berkeley) 5/19/95
35 */
36
37#include <sys/cdefs.h>
1/*-
2 * Copyright (c) 1982, 1986, 1990, 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_synch.c 8.9 (Berkeley) 5/19/95
35 */
36
37#include <sys/cdefs.h>
38__FBSDID("$FreeBSD: head/sys/kern/kern_synch.c 159631 2006-06-15 06:41:57Z davidxu $");
38__FBSDID("$FreeBSD: head/sys/kern/kern_synch.c 163709 2006-10-26 21:42:22Z jb $");
39
40#include "opt_ktrace.h"
41
42#include <sys/param.h>
43#include <sys/systm.h>
44#include <sys/condvar.h>
45#include <sys/kdb.h>
46#include <sys/kernel.h>

--- 353 unchanged lines hidden (view full) ---

400 /*
401 * Finish up stats for outgoing thread.
402 */
403 cnt.v_swtch++;
404 PCPU_SET(switchtime, new_switchtime);
405 PCPU_SET(switchticks, ticks);
406 CTR4(KTR_PROC, "mi_switch: old thread %p (kse %p, pid %ld, %s)",
407 (void *)td, td->td_sched, (long)p->p_pid, p->p_comm);
39
40#include "opt_ktrace.h"
41
42#include <sys/param.h>
43#include <sys/systm.h>
44#include <sys/condvar.h>
45#include <sys/kdb.h>
46#include <sys/kernel.h>

--- 353 unchanged lines hidden (view full) ---

400 /*
401 * Finish up stats for outgoing thread.
402 */
403 cnt.v_swtch++;
404 PCPU_SET(switchtime, new_switchtime);
405 PCPU_SET(switchticks, ticks);
406 CTR4(KTR_PROC, "mi_switch: old thread %p (kse %p, pid %ld, %s)",
407 (void *)td, td->td_sched, (long)p->p_pid, p->p_comm);
408#ifdef KSE
408 if ((flags & SW_VOL) && (td->td_proc->p_flag & P_SA))
409 newtd = thread_switchout(td, flags, newtd);
409 if ((flags & SW_VOL) && (td->td_proc->p_flag & P_SA))
410 newtd = thread_switchout(td, flags, newtd);
411#endif
410#if (KTR_COMPILE & KTR_SCHED) != 0
411 if (td == PCPU_GET(idlethread))
412 CTR3(KTR_SCHED, "mi_switch: %p(%s) prio %d idle",
413 td, td->td_proc->p_comm, td->td_priority);
414 else if (newtd != NULL)
415 CTR5(KTR_SCHED,
416 "mi_switch: %p(%s) prio %d preempted by %p(%s)",
417 td, td->td_proc->p_comm, td->td_priority, newtd,

--- 132 unchanged lines hidden ---
412#if (KTR_COMPILE & KTR_SCHED) != 0
413 if (td == PCPU_GET(idlethread))
414 CTR3(KTR_SCHED, "mi_switch: %p(%s) prio %d idle",
415 td, td->td_proc->p_comm, td->td_priority);
416 else if (newtd != NULL)
417 CTR5(KTR_SCHED,
418 "mi_switch: %p(%s) prio %d preempted by %p(%s)",
419 td, td->td_proc->p_comm, td->td_priority, newtd,

--- 132 unchanged lines hidden ---