4 * The contents of this file are subject to the terms of the
5 * Common Development and Distribution License, Version 1.0 only
6 * (the "License"). You may not use this file except in compliance
9 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
10 * or http://www.opensolaris.org/os/licensing.
11 * See the License for the specific language governing permissions
12 * and limitations under the License.
14 * When distributing Covered Code, include this CDDL HEADER in each
15 * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
16 * If applicable, add the following below this CDDL HEADER, with the
17 * fields enclosed by brackets "[]" replaced with your own identifying
18 * information: Portions Copyright [yyyy] [name of copyright owner]
23 * Copyright 2004 Sun Microsystems, Inc. All rights reserved.
24 * Use is subject to license terms.
27 /* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */
28 /* All Rights Reserved */
31 #ifndef _SYS_PRSYSTM_H
32 #define _SYS_PRSYSTM_H
34 #pragma ident "%Z%%M% %I% %E% SMI"
36 #include <sys/isa_defs.h>
45 extern kmutex_t pr_pidlock
;
46 extern kcondvar_t
*pr_pid_cv
;
61 * These are functions in the procfs module that are
62 * called from the kernel proper and from other modules.
64 extern uint_t
pr_getprot(struct seg
*, int, void **,
65 caddr_t
*, caddr_t
*, caddr_t
);
66 extern void pr_getprot_done(void **);
67 extern size_t pr_getsegsize(struct seg
*, int);
68 extern int pr_isobject(struct vnode
*);
69 extern int pr_isself(struct vnode
*);
70 extern void prinvalidate(struct user
*);
71 extern void prgetstatus(proc_t
*, struct pstatus
*, zone_t
*);
72 extern void prgetlwpstatus(kthread_t
*, struct lwpstatus
*, zone_t
*);
73 extern void prgetpsinfo(proc_t
*, struct psinfo
*);
74 extern void prgetlwpsinfo(kthread_t
*, struct lwpsinfo
*);
75 extern void prgetprfpregs(klwp_t
*, struct prfpregset
*);
76 extern void prgetprxregs(klwp_t
*, caddr_t
);
77 extern int prgetprxregsize(proc_t
*);
79 /* Work around lint confusion between old and new prcred definitions */
80 extern void prgetcred();
82 extern void prgetcred(proc_t
*, struct prcred
*);
84 extern void prgetpriv(proc_t
*, struct prpriv
*);
85 extern size_t prgetprivsize(void);
86 extern int prnsegs(struct as
*, int);
87 extern void prexit(proc_t
*);
88 extern void prfree(proc_t
*);
89 extern void prlwpexit(kthread_t
*);
90 extern void prlwpfree(proc_t
*, lwpent_t
*);
91 extern void prexecstart(void);
92 extern void prexecend(void);
93 extern void prrelvm(void);
94 extern void prbarrier(proc_t
*);
95 extern void prstop(int, int);
96 extern void prnotify(struct vnode
*);
97 extern void prstep(klwp_t
*, int);
98 extern void prnostep(klwp_t
*);
99 extern void prdostep(void);
100 extern int prundostep(void);
101 extern int prhasfp(void);
102 extern int prhasx(proc_t
*);
103 extern caddr_t
prmapin(struct as
*, caddr_t
, int);
104 extern void prmapout(struct as
*, caddr_t
, caddr_t
, int);
105 extern int pr_watch_emul(struct regs
*, caddr_t
, enum seg_rw
);
106 extern void pr_free_watched_pages(proc_t
*);
107 extern int pr_allstopped(proc_t
*, int);
110 extern int prnwindows(klwp_t
*);
111 extern void prgetwindows(klwp_t
*, struct gwindows
*);
112 #if defined(__sparcv9) /* 32-bit adb macros should not see these defs */
113 extern void prgetasregs(klwp_t
*, asrset_t
);
114 extern void prsetasregs(klwp_t
*, asrset_t
);
115 #endif /* __sparcv9 */
119 extern int prnldt(proc_t
*);
120 extern void prgetldt(proc_t
*, struct ssd
*);
123 #ifdef _SYSCALL32_IMPL
129 extern void prgetstatus32(proc_t
*, struct pstatus32
*, zone_t
*);
130 extern void prgetlwpstatus32(kthread_t
*, struct lwpstatus32
*, zone_t
*);
131 extern void prgetpsinfo32(proc_t
*, struct psinfo32
*);
132 extern void prgetlwpsinfo32(kthread_t
*, struct lwpsinfo32
*);
133 extern void prgetprfpregs32(klwp_t
*, struct prfpregset32
*);
136 void prgetwindows32(klwp_t
*, struct gwindows32
*);
138 #endif /* _SYSCALL32_IMPL */
140 #endif /* defined (_KERNEL) */
146 #endif /* _SYS_PRSYSTM_H */