db_ps.c (197684) | db_ps.c (201794) |
---|---|
1/*- 2 * Copyright (c) 1993 The Regents of the University of California. 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 --- 14 unchanged lines hidden (view full) --- 23 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 24 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 25 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 26 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 27 * SUCH DAMAGE. 28 */ 29 30#include <sys/cdefs.h> | 1/*- 2 * Copyright (c) 1993 The Regents of the University of California. 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 --- 14 unchanged lines hidden (view full) --- 23 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 24 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 25 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 26 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 27 * SUCH DAMAGE. 28 */ 29 30#include <sys/cdefs.h> |
31__FBSDID("$FreeBSD: head/sys/ddb/db_ps.c 197684 2009-10-01 19:12:14Z jhb $"); | 31__FBSDID("$FreeBSD: head/sys/ddb/db_ps.c 201794 2010-01-08 15:44:49Z trasz $"); |
32 33#include <sys/param.h> 34#include <sys/cons.h> 35#include <sys/jail.h> 36#include <sys/kdb.h> 37#include <sys/linker_set.h> 38#include <sys/proc.h> 39#include <sys/sysent.h> --- 91 unchanged lines hidden (view full) --- 131 FOREACH_THREAD_IN_PROC(p, td) { 132 if (td->td_state == TDS_RUNNING || 133 td->td_state == TDS_RUNQ || 134 td->td_state == TDS_CAN_RUN) 135 rflag++; 136 if (TD_ON_LOCK(td)) 137 lflag++; 138 if (TD_IS_SLEEPING(td)) { | 32 33#include <sys/param.h> 34#include <sys/cons.h> 35#include <sys/jail.h> 36#include <sys/kdb.h> 37#include <sys/linker_set.h> 38#include <sys/proc.h> 39#include <sys/sysent.h> --- 91 unchanged lines hidden (view full) --- 131 FOREACH_THREAD_IN_PROC(p, td) { 132 if (td->td_state == TDS_RUNNING || 133 td->td_state == TDS_RUNQ || 134 td->td_state == TDS_CAN_RUN) 135 rflag++; 136 if (TD_ON_LOCK(td)) 137 lflag++; 138 if (TD_IS_SLEEPING(td)) { |
139 if (!td->td_flags & TDF_SINTR) | 139 if (!(td->td_flags & TDF_SINTR)) |
140 dflag++; 141 else 142 sflag++; 143 } 144 if (TD_AWAITING_INTR(td)) 145 wflag++; 146 } 147 if (rflag) --- 18 unchanged lines hidden (view full) --- 166 break; 167 default: 168 state[0] = 'U'; 169 break; 170 } 171 state[1] = '\0'; 172 173 /* Additional process state flags. */ | 140 dflag++; 141 else 142 sflag++; 143 } 144 if (TD_AWAITING_INTR(td)) 145 wflag++; 146 } 147 if (rflag) --- 18 unchanged lines hidden (view full) --- 166 break; 167 default: 168 state[0] = 'U'; 169 break; 170 } 171 state[1] = '\0'; 172 173 /* Additional process state flags. */ |
174 if (!p->p_flag & P_INMEM) | 174 if (!(p->p_flag & P_INMEM)) |
175 strlcat(state, "W", sizeof(state)); 176 if (p->p_flag & P_TRACED) 177 strlcat(state, "X", sizeof(state)); 178 if (p->p_flag & P_WEXIT && p->p_state != PRS_ZOMBIE) 179 strlcat(state, "E", sizeof(state)); 180 if (p->p_flag & P_PPWAIT) 181 strlcat(state, "V", sizeof(state)); 182 if (p->p_flag & P_SYSTEM || p->p_lock > 0) --- 250 unchanged lines hidden --- | 175 strlcat(state, "W", sizeof(state)); 176 if (p->p_flag & P_TRACED) 177 strlcat(state, "X", sizeof(state)); 178 if (p->p_flag & P_WEXIT && p->p_state != PRS_ZOMBIE) 179 strlcat(state, "E", sizeof(state)); 180 if (p->p_flag & P_PPWAIT) 181 strlcat(state, "V", sizeof(state)); 182 if (p->p_flag & P_SYSTEM || p->p_lock > 0) --- 250 unchanged lines hidden --- |