Print this page
12046 Provide /proc/<PID>/fdinfo/
@@ -26,10 +26,11 @@
/* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */
/* All Rights Reserved */
/*
* Copyright 2018 Joyent, Inc.
+ * Copyright 2019 OmniOS Community Edition (OmniOSce) Association.
*/
#ifndef _SYS_PROC_PRDATA_H
#define _SYS_PROC_PRDATA_H
@@ -129,10 +130,12 @@
PR_WATCH, /* /proc/<pid>/watch */
PR_CURDIR, /* /proc/<pid>/cwd */
PR_ROOTDIR, /* /proc/<pid>/root */
PR_FDDIR, /* /proc/<pid>/fd */
PR_FD, /* /proc/<pid>/fd/nn */
+ PR_FDINFODIR, /* /proc/<pid>/fdinfo */
+ PR_FDINFO, /* /proc/<pid>/fdinfo/nn */
PR_OBJECTDIR, /* /proc/<pid>/object */
PR_OBJECT, /* /proc/<pid>/object/xxx */
PR_LWPDIR, /* /proc/<pid>/lwp */
PR_LWPIDDIR, /* /proc/<pid>/lwp/<lwpid> */
PR_LWPCTL, /* /proc/<pid>/lwp/<lwpid>/lwpctl */
@@ -286,11 +289,11 @@
* list_t listhead;
* struct my *mp;
*
* pr_iol_initlist(&listhead, sizeof (*mp), n);
* while (whatever) {
- * mp = pr_iol_newbuf(&listhead, sizeof (*mp);
+ * mp = pr_iol_newbuf(&listhead, sizeof (*mp));
* ...
* error = ...
* }
*
* When done, depending on whether copyout() or uiomove() is supposed to
@@ -311,10 +314,11 @@
extern void pr_iol_initlist(list_t *head, size_t itemsize, int nitems);
extern void * pr_iol_newbuf(list_t *head, size_t itemsize);
extern int pr_iol_copyout_and_free(list_t *head, caddr_t *tgt, int errin);
extern int pr_iol_uiomove_and_free(list_t *head, uio_t *uiop, int errin);
+extern void pr_iol_freelist(list_t *);
#if defined(_SYSCALL32_IMPL)
extern int prwritectl32(vnode_t *, struct uio *, cred_t *);
extern void prgetaction32(proc_t *, user_t *, uint_t, struct sigaction32 *);
@@ -345,10 +349,12 @@
extern int pr_nice(proc_t *, int, cred_t *);
extern void pr_setentryexit(proc_t *, sysset_t *, int);
extern int pr_set(proc_t *, long);
extern int pr_unset(proc_t *, long);
extern void pr_sethold(prnode_t *, sigset_t *);
+extern file_t *pr_getf(proc_t *, uint_t, short *);
+extern void pr_releasef(proc_t *, uint_t);
extern void pr_setfault(proc_t *, fltset_t *);
extern int prusrio(proc_t *, enum uio_rw, struct uio *, int);
extern int prwritectl(vnode_t *, struct uio *, cred_t *);
extern int prlock(prnode_t *, int);
extern void prunmark(proc_t *);