12 *
13 * When distributing Covered Code, include this CDDL HEADER in each
14 * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15 * If applicable, add the following below this CDDL HEADER, with the
16 * fields enclosed by brackets "[]" replaced with your own identifying
17 * information: Portions Copyright [yyyy] [name of copyright owner]
18 *
19 * CDDL HEADER END
20 */
21
22 /*
23 * Copyright 2009 Sun Microsystems, Inc. All rights reserved.
24 * Use is subject to license terms.
25 */
26
27 /* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */
28 /* All Rights Reserved */
29
30 /*
31 * Copyright (c) 2013, Joyent, Inc. All rights reserved.
32 */
33
34 #ifndef _SYS_PRSYSTM_H
35 #define _SYS_PRSYSTM_H
36
37 #include <sys/isa_defs.h>
38 #include <sys/zone.h>
39
40 #ifdef __cplusplus
41 extern "C" {
42 #endif
43
44 #if defined(_KERNEL)
45
46 extern kmutex_t pr_pidlock;
47 extern kcondvar_t *pr_pid_cv;
48
49 struct prfpregset;
50 struct pstatus;
51 struct lwpstatus;
52 struct psinfo;
53 struct lwpsinfo;
54 struct prcred;
55 struct prpriv;
56 struct prsecflags;
57
58 struct seg;
59 struct regs;
60 struct watched_page;
61
62 /*
63 * These are functions in the procfs module that are
64 * called from the kernel proper and from other modules.
65 */
66 extern uint_t pr_getprot(struct seg *, int, void **,
67 caddr_t *, caddr_t *, caddr_t);
68 extern void pr_getprot_done(void **);
69 extern size_t pr_getsegsize(struct seg *, int);
70 extern int pr_isobject(struct vnode *);
71 extern int pr_isself(struct vnode *);
72 extern void prinvalidate(struct user *);
73 extern void prgetstatus(proc_t *, struct pstatus *, zone_t *);
74 extern void prgetlwpstatus(kthread_t *, struct lwpstatus *, zone_t *);
75 extern void prgetpsinfo(proc_t *, struct psinfo *);
76 extern void prgetlwpsinfo(kthread_t *, struct lwpsinfo *);
77 extern void prgetprfpregs(klwp_t *, struct prfpregset *);
78 extern void prgetprxregs(klwp_t *, caddr_t);
79 extern int prgetprxregsize(proc_t *);
80 #if defined(__lint)
81 /* Work around lint confusion between old and new prcred definitions */
82 extern void prgetcred();
83 #else
84 extern void prgetcred(proc_t *, struct prcred *);
85 #endif
86 extern void prgetpriv(proc_t *, struct prpriv *);
87 extern size_t prgetprivsize(void);
88 extern void prgetsecflags(proc_t *, struct prsecflags *);
89 extern int prnsegs(struct as *, int);
90 extern void prexit(proc_t *);
91 extern void prfree(proc_t *);
92 extern void prlwpexit(kthread_t *);
93 extern void prlwpfree(proc_t *, lwpent_t *);
94 extern void prexecstart(void);
95 extern void prexecend(void);
96 extern void prrelvm(void);
97 extern void prbarrier(proc_t *);
98 extern void prstop(int, int);
99 extern void prunstop(void);
100 extern void prnotify(struct vnode *);
101 extern void prstep(klwp_t *, int);
102 extern void prnostep(klwp_t *);
103 extern void prdostep(void);
104 extern int prundostep(void);
105 extern int prhasfp(void);
106 extern int prhasx(proc_t *);
107 extern caddr_t prmapin(struct as *, caddr_t, int);
108 extern void prmapout(struct as *, caddr_t, caddr_t, int);
109 extern int pr_watch_emul(struct regs *, caddr_t, enum seg_rw);
|
12 *
13 * When distributing Covered Code, include this CDDL HEADER in each
14 * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15 * If applicable, add the following below this CDDL HEADER, with the
16 * fields enclosed by brackets "[]" replaced with your own identifying
17 * information: Portions Copyright [yyyy] [name of copyright owner]
18 *
19 * CDDL HEADER END
20 */
21
22 /*
23 * Copyright 2009 Sun Microsystems, Inc. All rights reserved.
24 * Use is subject to license terms.
25 */
26
27 /* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */
28 /* All Rights Reserved */
29
30 /*
31 * Copyright (c) 2013, Joyent, Inc. All rights reserved.
32 * Copyright 2019 OmniOS Community Edition (OmniOSce) Association.
33 */
34
35 #ifndef _SYS_PRSYSTM_H
36 #define _SYS_PRSYSTM_H
37
38 #include <sys/isa_defs.h>
39 #include <sys/zone.h>
40
41 #ifdef __cplusplus
42 extern "C" {
43 #endif
44
45 #if defined(_KERNEL)
46
47 extern kmutex_t pr_pidlock;
48 extern kcondvar_t *pr_pid_cv;
49
50 struct prfpregset;
51 struct pstatus;
52 struct lwpstatus;
53 struct psinfo;
54 struct lwpsinfo;
55 struct prcred;
56 struct prpriv;
57 struct prsecflags;
58 struct prfdinfov2;
59
60 struct seg;
61 struct regs;
62 struct watched_page;
63
64 /*
65 * These are functions in the procfs module that are
66 * called from the kernel proper and from other modules.
67 */
68 extern uint_t pr_getprot(struct seg *, int, void **,
69 caddr_t *, caddr_t *, caddr_t);
70 extern void pr_getprot_done(void **);
71 extern size_t pr_getsegsize(struct seg *, int);
72 extern int pr_isobject(struct vnode *);
73 extern int pr_isself(struct vnode *);
74 extern void prinvalidate(struct user *);
75 extern void prgetstatus(proc_t *, struct pstatus *, zone_t *);
76 extern void prgetlwpstatus(kthread_t *, struct lwpstatus *, zone_t *);
77 extern void prgetpsinfo(proc_t *, struct psinfo *);
78 extern void prgetlwpsinfo(kthread_t *, struct lwpsinfo *);
79 extern void prgetprfpregs(klwp_t *, struct prfpregset *);
80 extern void prgetprxregs(klwp_t *, caddr_t);
81 extern int prgetprxregsize(proc_t *);
82 extern void prgetcred(proc_t *, struct prcred *);
83 extern void prgetpriv(proc_t *, struct prpriv *);
84 extern size_t prgetprivsize(void);
85 extern void prgetsecflags(proc_t *, struct prsecflags *);
86 extern int prnsegs(struct as *, int);
87 extern u_offset_t prgetfdinfosize(proc_t *, vnode_t *, cred_t *);
88 extern int prgetfdinfo(proc_t *, vnode_t *, struct prfdinfov2 *, cred_t *,
89 list_t *);
90 extern void prexit(proc_t *);
91 extern void prfree(proc_t *);
92 extern void prlwpexit(kthread_t *);
93 extern void prlwpfree(proc_t *, lwpent_t *);
94 extern void prexecstart(void);
95 extern void prexecend(void);
96 extern void prrelvm(void);
97 extern void prbarrier(proc_t *);
98 extern void prstop(int, int);
99 extern void prunstop(void);
100 extern void prnotify(struct vnode *);
101 extern void prstep(klwp_t *, int);
102 extern void prnostep(klwp_t *);
103 extern void prdostep(void);
104 extern int prundostep(void);
105 extern int prhasfp(void);
106 extern int prhasx(proc_t *);
107 extern caddr_t prmapin(struct as *, caddr_t, int);
108 extern void prmapout(struct as *, caddr_t, caddr_t, int);
109 extern int pr_watch_emul(struct regs *, caddr_t, enum seg_rw);
|