Deleted Added
full compact
proc.h (144444) proc.h (144777)
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.

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

27 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
28 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
29 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
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 * @(#)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.

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

27 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
28 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
29 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
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 * @(#)proc.h 8.15 (Berkeley) 5/19/95
35 * $FreeBSD: head/sys/sys/proc.h 144444 2005-03-31 22:50:14Z jhb $
35 * $FreeBSD: head/sys/sys/proc.h 144777 2005-04-08 03:37:53Z ups $
36 */
37
38#ifndef _SYS_PROC_H_
39#define _SYS_PROC_H_
40
41#include <sys/callout.h> /* For struct callout. */
42#include <sys/event.h> /* For struct klist. */
43#ifndef _KERNEL

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

129 * d - locked by allproc_lock lock
130 * e - locked by proctree_lock lock
131 * f - session mtx
132 * g - process group mtx
133 * h - callout_lock mtx
134 * i - by curproc or the master session mtx
135 * j - locked by sched_lock mtx
136 * k - only accessed by curthread
36 */
37
38#ifndef _SYS_PROC_H_
39#define _SYS_PROC_H_
40
41#include <sys/callout.h> /* For struct callout. */
42#include <sys/event.h> /* For struct klist. */
43#ifndef _KERNEL

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

129 * d - locked by allproc_lock lock
130 * e - locked by proctree_lock lock
131 * f - session mtx
132 * g - process group mtx
133 * h - callout_lock mtx
134 * i - by curproc or the master session mtx
135 * j - locked by sched_lock mtx
136 * k - only accessed by curthread
137 * k*- only accessed by curthread and from an interrupt
137 * l - the attaching proc or attaching proc parent
138 * m - Giant
139 * n - not locked, lazy
140 * o - ktrace lock
141 * p - select lock (sellock)
142 * q - td_contested lock
143 * r - p_peers lock
144 * x - created at fork, only changes during single threading in exec

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

258 int td_flags; /* (j) TDF_* flags. */
259 int td_inhibitors; /* (j) Why can not run. */
260 int td_pflags; /* (k) Private thread (TDP_*) flags. */
261 int td_dupfd; /* (k) Ret value from fdopen. XXX */
262 void *td_wchan; /* (j) Sleep address. */
263 const char *td_wmesg; /* (j) Reason for sleep. */
264 u_char td_lastcpu; /* (j) Last cpu we were on. */
265 u_char td_oncpu; /* (j) Which cpu we are on. */
138 * l - the attaching proc or attaching proc parent
139 * m - Giant
140 * n - not locked, lazy
141 * o - ktrace lock
142 * p - select lock (sellock)
143 * q - td_contested lock
144 * r - p_peers lock
145 * x - created at fork, only changes during single threading in exec

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

259 int td_flags; /* (j) TDF_* flags. */
260 int td_inhibitors; /* (j) Why can not run. */
261 int td_pflags; /* (k) Private thread (TDP_*) flags. */
262 int td_dupfd; /* (k) Ret value from fdopen. XXX */
263 void *td_wchan; /* (j) Sleep address. */
264 const char *td_wmesg; /* (j) Reason for sleep. */
265 u_char td_lastcpu; /* (j) Last cpu we were on. */
266 u_char td_oncpu; /* (j) Which cpu we are on. */
267 volatile u_char td_owepreempt; /* (k*) Preempt on last critical_exit */
266 short td_locks; /* (k) DEBUG: lockmgr count of locks. */
267 struct turnstile *td_blocked; /* (j) Lock process is blocked on. */
268 struct ithd *td_ithd; /* (b) For interrupt threads only. */
269 const char *td_lockname; /* (j) Name of lock blocked on. */
270 LIST_HEAD(, turnstile) td_contested; /* (q) Contested locks. */
271 struct lock_list_entry *td_sleeplocks; /* (k) Held sleep locks. */
272 int td_intr_nesting_level; /* (k) Interrupt recursion. */
273 int td_pinned; /* (k) Temporary cpu pin count. */

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

312 struct callout td_slpcallout; /* (h) Callout for sleep. */
313 struct trapframe *td_frame; /* (k) */
314 struct vm_object *td_kstack_obj;/* (a) Kstack object. */
315 vm_offset_t td_kstack; /* (a) Kernel VA of kstack. */
316 int td_kstack_pages; /* (a) Size of the kstack. */
317 struct vm_object *td_altkstack_obj;/* (a) Alternate kstack object. */
318 vm_offset_t td_altkstack; /* (a) Kernel VA of alternate kstack. */
319 int td_altkstack_pages; /* (a) Size of alternate kstack. */
268 short td_locks; /* (k) DEBUG: lockmgr count of locks. */
269 struct turnstile *td_blocked; /* (j) Lock process is blocked on. */
270 struct ithd *td_ithd; /* (b) For interrupt threads only. */
271 const char *td_lockname; /* (j) Name of lock blocked on. */
272 LIST_HEAD(, turnstile) td_contested; /* (q) Contested locks. */
273 struct lock_list_entry *td_sleeplocks; /* (k) Held sleep locks. */
274 int td_intr_nesting_level; /* (k) Interrupt recursion. */
275 int td_pinned; /* (k) Temporary cpu pin count. */

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

314 struct callout td_slpcallout; /* (h) Callout for sleep. */
315 struct trapframe *td_frame; /* (k) */
316 struct vm_object *td_kstack_obj;/* (a) Kstack object. */
317 vm_offset_t td_kstack; /* (a) Kernel VA of kstack. */
318 int td_kstack_pages; /* (a) Size of the kstack. */
319 struct vm_object *td_altkstack_obj;/* (a) Alternate kstack object. */
320 vm_offset_t td_altkstack; /* (a) Kernel VA of alternate kstack. */
321 int td_altkstack_pages; /* (a) Size of alternate kstack. */
320 u_int td_critnest; /* (k) Critical section nest level. */
322 volatile u_int td_critnest; /* (k*) Critical section nest level. */
321 struct mdthread td_md; /* (k) Any machine-dependent fields. */
322 struct td_sched *td_sched; /* (*) Scheduler-specific data. */
323};
324
325/*
326 * Flags kept in td_flags:
327 * To change these you MUST have the scheduler lock.
328 */

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

361#define TDP_OLDMASK 0x00000001 /* Need to restore mask after suspend. */
362#define TDP_INKTR 0x00000002 /* Thread is currently in KTR code. */
363#define TDP_INKTRACE 0x00000004 /* Thread is currently in KTRACE code. */
364#define TDP_UPCALLING 0x00000008 /* This thread is doing an upcall. */
365#define TDP_COWINPROGRESS 0x00000010 /* Snapshot copy-on-write in progress. */
366#define TDP_ALTSTACK 0x00000020 /* Have alternate signal stack. */
367#define TDP_DEADLKTREAT 0x00000040 /* Lock aquisition - deadlock treatment. */
368#define TDP_SA 0x00000080 /* A scheduler activation based thread. */
323 struct mdthread td_md; /* (k) Any machine-dependent fields. */
324 struct td_sched *td_sched; /* (*) Scheduler-specific data. */
325};
326
327/*
328 * Flags kept in td_flags:
329 * To change these you MUST have the scheduler lock.
330 */

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

363#define TDP_OLDMASK 0x00000001 /* Need to restore mask after suspend. */
364#define TDP_INKTR 0x00000002 /* Thread is currently in KTR code. */
365#define TDP_INKTRACE 0x00000004 /* Thread is currently in KTRACE code. */
366#define TDP_UPCALLING 0x00000008 /* This thread is doing an upcall. */
367#define TDP_COWINPROGRESS 0x00000010 /* Snapshot copy-on-write in progress. */
368#define TDP_ALTSTACK 0x00000020 /* Have alternate signal stack. */
369#define TDP_DEADLKTREAT 0x00000040 /* Lock aquisition - deadlock treatment. */
370#define TDP_SA 0x00000080 /* A scheduler activation based thread. */
369#define TDP_OWEPREEMPT 0x00000100 /* Thread has a pending preemption. */
371#define TDP_UNUSED8 0x00000100 /* --available -- */
370#define TDP_OWEUPC 0x00000200 /* Call addupc() at next AST. */
371#define TDP_WAKEPROC0 0x00000400 /* Wants caller to wakeup(&proc0) */
372#define TDP_CAN_UNBIND 0x00000800 /* Only temporarily bound. */
373#define TDP_SCHED1 0x00001000 /* Reserved for scheduler private use */
374#define TDP_SCHED2 0x00002000 /* Reserved for scheduler private use */
375#define TDP_SCHED3 0x00004000 /* Reserved for scheduler private use */
376#define TDP_SCHED4 0x00008000 /* Reserved for scheduler private use */
377#define TDP_GEOM 0x00010000 /* Settle GEOM before finishing syscall */

--- 560 unchanged lines hidden ---
372#define TDP_OWEUPC 0x00000200 /* Call addupc() at next AST. */
373#define TDP_WAKEPROC0 0x00000400 /* Wants caller to wakeup(&proc0) */
374#define TDP_CAN_UNBIND 0x00000800 /* Only temporarily bound. */
375#define TDP_SCHED1 0x00001000 /* Reserved for scheduler private use */
376#define TDP_SCHED2 0x00002000 /* Reserved for scheduler private use */
377#define TDP_SCHED3 0x00004000 /* Reserved for scheduler private use */
378#define TDP_SCHED4 0x00008000 /* Reserved for scheduler private use */
379#define TDP_GEOM 0x00010000 /* Settle GEOM before finishing syscall */

--- 560 unchanged lines hidden ---