kern_fork.c (132682) | kern_fork.c (133396) |
---|---|
1/* 2 * Copyright (c) 1982, 1986, 1989, 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_fork.c 8.6 (Berkeley) 4/8/94 35 */ 36 37#include <sys/cdefs.h> | 1/* 2 * Copyright (c) 1982, 1986, 1989, 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_fork.c 8.6 (Berkeley) 4/8/94 35 */ 36 37#include <sys/cdefs.h> |
38__FBSDID("$FreeBSD: head/sys/kern/kern_fork.c 132682 2004-07-27 03:46:31Z bmilekic $"); | 38__FBSDID("$FreeBSD: head/sys/kern/kern_fork.c 133396 2004-08-09 18:21:12Z julian $"); |
39 40#include "opt_ktrace.h" 41#include "opt_mac.h" 42 43#include <sys/param.h> 44#include <sys/systm.h> 45#include <sys/sysproto.h> 46#include <sys/eventhandler.h> --- 742 unchanged lines hidden (view full) --- 789 td = curthread; 790 p = td->td_proc; 791 td->td_oncpu = PCPU_GET(cpuid); 792 KASSERT(p->p_state == PRS_NORMAL, ("executing process is still new")); 793 794 sched_lock.mtx_lock = (uintptr_t)td; 795 mtx_assert(&sched_lock, MA_OWNED | MA_NOTRECURSED); 796 cpu_critical_fork_exit(); | 39 40#include "opt_ktrace.h" 41#include "opt_mac.h" 42 43#include <sys/param.h> 44#include <sys/systm.h> 45#include <sys/sysproto.h> 46#include <sys/eventhandler.h> --- 742 unchanged lines hidden (view full) --- 789 td = curthread; 790 p = td->td_proc; 791 td->td_oncpu = PCPU_GET(cpuid); 792 KASSERT(p->p_state == PRS_NORMAL, ("executing process is still new")); 793 794 sched_lock.mtx_lock = (uintptr_t)td; 795 mtx_assert(&sched_lock, MA_OWNED | MA_NOTRECURSED); 796 cpu_critical_fork_exit(); |
797 CTR3(KTR_PROC, "fork_exit: new thread %p (pid %d, %s)", td, p->p_pid, 798 p->p_comm); | 797 CTR4(KTR_PROC, "fork_exit: new thread %p (kse %p, pid %d, %s)", 798 td, td->td_kse, p->p_pid, p->p_comm); |
799 800 /* 801 * Processes normally resume in mi_switch() after being 802 * cpu_switch()'ed to, but when children start up they arrive here 803 * instead, so we must do much the same things as mi_switch() would. 804 */ 805 806 if ((td = PCPU_GET(deadthread))) { --- 51 unchanged lines hidden --- | 799 800 /* 801 * Processes normally resume in mi_switch() after being 802 * cpu_switch()'ed to, but when children start up they arrive here 803 * instead, so we must do much the same things as mi_switch() would. 804 */ 805 806 if ((td = PCPU_GET(deadthread))) { --- 51 unchanged lines hidden --- |