Deleted Added
full compact
proc.h (31403) proc.h (31564)
1/*-
2 * Copyright (c) 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.

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

31 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
32 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
33 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
34 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
35 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
36 * SUCH DAMAGE.
37 *
38 * @(#)proc.h 8.15 (Berkeley) 5/19/95
1/*-
2 * Copyright (c) 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.

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

31 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
32 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
33 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
34 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
35 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
36 * SUCH DAMAGE.
37 *
38 * @(#)proc.h 8.15 (Berkeley) 5/19/95
39 * $Id: proc.h,v 1.48 1997/11/24 15:15:20 bde Exp $
39 * $Id: proc.h,v 1.49 1997/11/25 07:07:48 julian Exp $
40 */
41
42#ifndef _SYS_PROC_H_
43#define _SYS_PROC_H_
44
45#include <machine/proc.h> /* Machine-dependent proc substruct. */
46#include <sys/callout.h> /* For struct callout_handle. */
47#include <sys/rtprio.h> /* For struct rtprio. */

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

146
147 char p_lock; /* Process lock (prevent swap) count. */
148 char p_oncpu; /* Which cpu we are on */
149 char p_lastcpu; /* Last cpu we were on */
150 char p_pad2; /* alignment */
151
152 short p_locks; /* DEBUG: lockmgr count of held locks */
153 short p_simple_locks; /* DEBUG: count of held simple locks */
40 */
41
42#ifndef _SYS_PROC_H_
43#define _SYS_PROC_H_
44
45#include <machine/proc.h> /* Machine-dependent proc substruct. */
46#include <sys/callout.h> /* For struct callout_handle. */
47#include <sys/rtprio.h> /* For struct rtprio. */

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

146
147 char p_lock; /* Process lock (prevent swap) count. */
148 char p_oncpu; /* Which cpu we are on */
149 char p_lastcpu; /* Last cpu we were on */
150 char p_pad2; /* alignment */
151
152 short p_locks; /* DEBUG: lockmgr count of held locks */
153 short p_simple_locks; /* DEBUG: count of held simple locks */
154 unsigned int p_stops; /* procfs event bitmask */
155 unsigned int p_stype; /* procfs stop event type */
156 char p_step; /* procfs stop *once* flag */
157 unsigned char p_pfsflags; /* procfs flags */
158 char p_pad3[2]; /* padding for alignment */
154 register_t p_retval[2]; /* syscall aux returns */
155
156/* End area that is zeroed on creation. */
157#define p_endzero p_startcopy
158
159/* The following fields are all copied upon creation in fork. */
160#define p_startcopy p_sigmask
161

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

265
266#define SESS_LEADER(p) ((p)->p_session->s_leader == (p))
267#define SESSHOLD(s) ((s)->s_count++)
268#define SESSRELE(s) { \
269 if (--(s)->s_count == 0) \
270 FREE(s, M_SESSION); \
271}
272
159 register_t p_retval[2]; /* syscall aux returns */
160
161/* End area that is zeroed on creation. */
162#define p_endzero p_startcopy
163
164/* The following fields are all copied upon creation in fork. */
165#define p_startcopy p_sigmask
166

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

270
271#define SESS_LEADER(p) ((p)->p_session->s_leader == (p))
272#define SESSHOLD(s) ((s)->s_count++)
273#define SESSRELE(s) { \
274 if (--(s)->s_count == 0) \
275 FREE(s, M_SESSION); \
276}
277
278extern void stopevent(struct proc*, unsigned int, unsigned int);
279#define STOPEVENT(p,e,v) do { \
280 if ((p)->p_stops & (e)) stopevent(p,e,v); } while (0)
281
273/* hold process U-area in memory, normally for ptrace/procfs work */
274#define PHOLD(p) { \
275 if ((p)->p_lock++ == 0 && ((p)->p_flag & P_INMEM) == 0) \
276 faultin(p); \
277}
278#define PRELE(p) (--(p)->p_lock)
279
280#define PIDHASH(pid) (&pidhashtbl[(pid) & pidhash])

--- 57 unchanged lines hidden ---
282/* hold process U-area in memory, normally for ptrace/procfs work */
283#define PHOLD(p) { \
284 if ((p)->p_lock++ == 0 && ((p)->p_flag & P_INMEM) == 0) \
285 faultin(p); \
286}
287#define PRELE(p) (--(p)->p_lock)
288
289#define PIDHASH(pid) (&pidhashtbl[(pid) & pidhash])

--- 57 unchanged lines hidden ---