kern_proc.c (104379) | kern_proc.c (104387) |
---|---|
1/* 2 * Copyright (c) 1982, 1986, 1989, 1991, 1993 3 * The Regents of the University of California. 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 --- 17 unchanged lines hidden (view full) --- 26 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 27 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 28 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 29 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 30 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 31 * SUCH DAMAGE. 32 * 33 * @(#)kern_proc.c 8.7 (Berkeley) 2/14/95 | 1/* 2 * Copyright (c) 1982, 1986, 1989, 1991, 1993 3 * The Regents of the University of California. 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 --- 17 unchanged lines hidden (view full) --- 26 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 27 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 28 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 29 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 30 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 31 * SUCH DAMAGE. 32 * 33 * @(#)kern_proc.c 8.7 (Berkeley) 2/14/95 |
34 * $FreeBSD: head/sys/kern/kern_proc.c 104379 2002-10-02 16:48:16Z archie $ | 34 * $FreeBSD: head/sys/kern/kern_proc.c 104387 2002-10-02 20:31:47Z jhb $ |
35 */ 36 37#include "opt_ktrace.h" 38#include "opt_kstack_pages.h" 39 40#include <sys/param.h> 41#include <sys/systm.h> 42#include <sys/kernel.h> --- 879 unchanged lines hidden (view full) --- 922 mtx_unlock_spin(&sched_lock); 923 return; 924 } 925 if (!(p->p_flag & P_KSES)) { 926 if (td->td_wmesg != NULL) { 927 strncpy(kp->ki_wmesg, td->td_wmesg, 928 sizeof(kp->ki_wmesg) - 1); 929 } | 35 */ 36 37#include "opt_ktrace.h" 38#include "opt_kstack_pages.h" 39 40#include <sys/param.h> 41#include <sys/systm.h> 42#include <sys/kernel.h> --- 879 unchanged lines hidden (view full) --- 922 mtx_unlock_spin(&sched_lock); 923 return; 924 } 925 if (!(p->p_flag & P_KSES)) { 926 if (td->td_wmesg != NULL) { 927 strncpy(kp->ki_wmesg, td->td_wmesg, 928 sizeof(kp->ki_wmesg) - 1); 929 } |
930 if (TD_ON_MUTEX(td)) { 931 kp->ki_kiflag |= KI_MTXBLOCK; 932 strncpy(kp->ki_mtxname, td->td_mtxname, 933 sizeof(kp->ki_mtxname) - 1); | 930 if (TD_ON_LOCK(td)) { 931 kp->ki_kiflag |= KI_LOCKBLOCK; 932 strncpy(kp->ki_lockname, td->td_lockname, 933 sizeof(kp->ki_lockname) - 1); |
934 } 935 } 936 937 if (p->p_state == PRS_NORMAL) { /* XXXKSE very approximate */ 938 if (TD_ON_RUNQ(td) || 939 TD_CAN_RUN(td) || 940 TD_IS_RUNNING(td)) { 941 kp->ki_stat = SRUN; 942 } else if (P_SHOULDSTOP(p)) { 943 kp->ki_stat = SSTOP; 944 } else if (TD_IS_SLEEPING(td)) { 945 kp->ki_stat = SSLEEP; | 934 } 935 } 936 937 if (p->p_state == PRS_NORMAL) { /* XXXKSE very approximate */ 938 if (TD_ON_RUNQ(td) || 939 TD_CAN_RUN(td) || 940 TD_IS_RUNNING(td)) { 941 kp->ki_stat = SRUN; 942 } else if (P_SHOULDSTOP(p)) { 943 kp->ki_stat = SSTOP; 944 } else if (TD_IS_SLEEPING(td)) { 945 kp->ki_stat = SSLEEP; |
946 } else if (TD_ON_MUTEX(td)) { 947 kp->ki_stat = SMTX; | 946 } else if (TD_ON_LOCK(td)) { 947 kp->ki_stat = SLOCK; |
948 } else { 949 kp->ki_stat = SWAIT; 950 } 951 } else { 952 kp->ki_stat = SIDL; 953 } 954 955 kp->ki_sflag = p->p_sflag; --- 386 unchanged lines hidden --- | 948 } else { 949 kp->ki_stat = SWAIT; 950 } 951 } else { 952 kp->ki_stat = SIDL; 953 } 954 955 kp->ki_sflag = p->p_sflag; --- 386 unchanged lines hidden --- |