#include <sys/file.h>
int
falloc(struct lwp *l, struct file **resultfp, int *resultfd);
struct file *
fd_getfile(struct filedesc *fdp, int fd);
int
dupfdopen(struct lwp *l, int indx, int dfd, int mode, int error);
int
fdalloc(struct proc *p, int want, int *result);
int
fdcheckstd(struct lwp *l);
void
fdclear(struct lwp *l);
int
fdclone(struct lwp *l, struct file *fp, int fd, int flag, const struct fileops *fops, void *data);
void
fdcloseexec(struct lwp *l);
struct filedesc *
fdcopy(struct proc *p);
void
fdexpand(struct proc *p);
void
fdfree(struct lwp *l);
struct filedesc *
fdinit(struct proc *p);
int
fdrelease(struct lwp *l, int fd);
void
fdremove(struct filedesc *fdp, int fd);
void
fdshare(struct proc *p1, struct proc *p2);
void
fdunshare(struct lwp *l);