1/* 2 * CDDL HEADER START 3 * 4 * The contents of this file are subject to the terms of the 5 * Common Development and Distribution License (the "License"). 6 * You may not use this file except in compliance with the License. 7 * 8 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 9 * or http://www.opensolaris.org/os/licensing. 10 * See the License for the specific language governing permissions 11 * and limitations under the License. 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#ifndef _SYS_PRSYSTM_H 32#define _SYS_PRSYSTM_H 33 34#include <sys/isa_defs.h> 35#include <sys/zone.h> 36 37#ifdef __cplusplus 38extern "C" { 39#endif 40 41#if defined(_KERNEL) 42 43extern kmutex_t pr_pidlock; 44extern kcondvar_t *pr_pid_cv; 45 46struct prfpregset; 47struct pstatus; 48struct lwpstatus; 49struct psinfo; 50struct lwpsinfo; 51struct prcred; 52struct prpriv; 53 54struct seg; 55struct regs; 56struct watched_page; 57 58/* 59 * These are functions in the procfs module that are 60 * called from the kernel proper and from other modules. 61 */ 62extern uint_t pr_getprot(struct seg *, int, void **, 63 caddr_t *, caddr_t *, caddr_t); 64extern void pr_getprot_done(void **); 65extern size_t pr_getsegsize(struct seg *, int); 66extern int pr_isobject(struct vnode *); 67extern int pr_isself(struct vnode *); 68extern void prinvalidate(struct user *); 69extern void prgetstatus(proc_t *, struct pstatus *, zone_t *); 70extern void prgetlwpstatus(kthread_t *, struct lwpstatus *, zone_t *); 71extern void prgetpsinfo(proc_t *, struct psinfo *); 72extern void prgetlwpsinfo(kthread_t *, struct lwpsinfo *); 73extern void prgetprfpregs(klwp_t *, struct prfpregset *); 74extern void prgetprxregs(klwp_t *, caddr_t); 75extern int prgetprxregsize(proc_t *); 76#if defined(__lint) 77/* Work around lint confusion between old and new prcred definitions */ 78extern void prgetcred(); 79#else 80extern void prgetcred(proc_t *, struct prcred *); 81#endif 82extern void prgetpriv(proc_t *, struct prpriv *); 83extern size_t prgetprivsize(void); 84extern int prnsegs(struct as *, int); 85extern void prexit(proc_t *); 86extern void prfree(proc_t *); 87extern void prlwpexit(kthread_t *); 88extern void prlwpfree(proc_t *, lwpent_t *); 89extern void prexecstart(void); 90extern void prexecend(void); 91extern void prrelvm(void); 92extern void prbarrier(proc_t *); 93extern void prstop(int, int); 94extern void prunstop(void); 95extern void prnotify(struct vnode *); 96extern void prstep(klwp_t *, int); 97extern void prnostep(klwp_t *); 98extern void prdostep(void); 99extern int prundostep(void); 100extern int prhasfp(void); 101extern int prhasx(proc_t *); 102extern caddr_t prmapin(struct as *, caddr_t, int); 103extern void prmapout(struct as *, caddr_t, caddr_t, int); 104extern int pr_watch_emul(struct regs *, caddr_t, enum seg_rw); 105extern void pr_free_watched_pages(proc_t *); 106extern int pr_allstopped(proc_t *, int); 107#if defined(__sparc) 108struct gwindows; 109extern int prnwindows(klwp_t *); 110extern void prgetwindows(klwp_t *, struct gwindows *); 111#if defined(__sparcv9) /* 32-bit adb macros should not see these defs */ 112extern void prgetasregs(klwp_t *, asrset_t); 113extern void prsetasregs(klwp_t *, asrset_t); 114#endif /* __sparcv9 */ 115#endif /* __sparc */ 116#if defined(__x86) 117struct ssd; 118extern int prnldt(proc_t *); 119extern void prgetldt(proc_t *, struct ssd *); 120#endif /* __x86 */ 121 122#ifdef _SYSCALL32_IMPL 123struct prfpregset32; 124struct pstatus32; 125struct lwpstatus32; 126struct psinfo32; 127struct lwpsinfo32; 128extern void prgetstatus32(proc_t *, struct pstatus32 *, zone_t *); 129extern void prgetlwpstatus32(kthread_t *, struct lwpstatus32 *, zone_t *); 130extern void prgetpsinfo32(proc_t *, struct psinfo32 *); 131extern void prgetlwpsinfo32(kthread_t *, struct lwpsinfo32 *); 132extern void prgetprfpregs32(klwp_t *, struct prfpregset32 *); 133#if defined(__sparc) 134struct gwindows32; 135void prgetwindows32(klwp_t *, struct gwindows32 *); 136#endif /* __sparc */ 137#endif /* _SYSCALL32_IMPL */ 138 139#endif /* defined (_KERNEL) */ 140 141#ifdef __cplusplus 142} 143#endif 144 145#endif /* _SYS_PRSYSTM_H */ 146