Changeset View
Changeset View
Standalone View
Standalone View
sys/sys/filedesc.h
Show First 20 Lines • Show All 83 Lines • ▼ Show 20 Lines | ||||||||||
}; | }; | |||||||||
#define fd_seqc(fdt, fd) (&(fdt)->fdt_ofiles[(fd)].fde_seqc) | #define fd_seqc(fdt, fd) (&(fdt)->fdt_ofiles[(fd)].fde_seqc) | |||||||||
#define NDSLOTTYPE u_long | #define NDSLOTTYPE u_long | |||||||||
/* | /* | |||||||||
* This struct is copy-on-write and allocated from an SMR zone. | * This struct is copy-on-write and allocated from an SMR zone. | |||||||||
* All fields are constant after initialization apart from the reference count. | * All fields are constant after initialization apart from the reference count. | |||||||||
* The ABI root directory is initialized as the root directory and changed | ||||||||||
* during process transiting to or from non-native ABI. | ||||||||||
* | * | |||||||||
kibUnsubmitted Not Done Inline Actions
kib: | ||||||||||
* Check pwd_* routines for usage. | * Check pwd_* routines for usage. | |||||||||
*/ | */ | |||||||||
struct pwd { | struct pwd { | |||||||||
u_int pwd_refcount; | u_int pwd_refcount; | |||||||||
struct vnode *pwd_cdir; /* current directory */ | struct vnode *pwd_cdir; /* current directory */ | |||||||||
struct vnode *pwd_rdir; /* root directory */ | struct vnode *pwd_rdir; /* root directory */ | |||||||||
struct vnode *pwd_jdir; /* jail root directory */ | struct vnode *pwd_jdir; /* jail root directory */ | |||||||||
struct vnode *pwd_adir; /* abi root directory */ | ||||||||||
}; | }; | |||||||||
typedef SMR_POINTER(struct pwd *) smrpwd_t; | typedef SMR_POINTER(struct pwd *) smrpwd_t; | |||||||||
struct pwddesc { | struct pwddesc { | |||||||||
struct mtx pd_lock; /* protects members of this struct */ | struct mtx pd_lock; /* protects members of this struct */ | |||||||||
smrpwd_t pd_pwd; /* directories */ | smrpwd_t pd_pwd; /* directories */ | |||||||||
u_int pd_refcount; | u_int pd_refcount; | |||||||||
u_short pd_cmask; /* mask for file creation */ | u_short pd_cmask; /* mask for file creation */ | |||||||||
▲ Show 20 Lines • Show All 232 Lines • ▼ Show 20 Lines | ||||||||||
void pdescfree(struct thread *td); | void pdescfree(struct thread *td); | |||||||||
struct pwddesc *pdinit(struct pwddesc *pdp, bool keeplock); | struct pwddesc *pdinit(struct pwddesc *pdp, bool keeplock); | |||||||||
struct pwddesc *pdshare(struct pwddesc *pdp); | struct pwddesc *pdshare(struct pwddesc *pdp); | |||||||||
void pdunshare(struct thread *td); | void pdunshare(struct thread *td); | |||||||||
void pwd_chdir(struct thread *td, struct vnode *vp); | void pwd_chdir(struct thread *td, struct vnode *vp); | |||||||||
int pwd_chroot(struct thread *td, struct vnode *vp); | int pwd_chroot(struct thread *td, struct vnode *vp); | |||||||||
int pwd_chroot_chdir(struct thread *td, struct vnode *vp); | int pwd_chroot_chdir(struct thread *td, struct vnode *vp); | |||||||||
void pwd_exec(struct thread *td, struct vnode *vp); | ||||||||||
void pwd_ensure_dirs(void); | void pwd_ensure_dirs(void); | |||||||||
void pwd_set_rootvnode(void); | void pwd_set_rootvnode(void); | |||||||||
struct pwd *pwd_hold_pwddesc(struct pwddesc *pdp); | struct pwd *pwd_hold_pwddesc(struct pwddesc *pdp); | |||||||||
bool pwd_hold_smr(struct pwd *pwd); | bool pwd_hold_smr(struct pwd *pwd); | |||||||||
struct pwd *pwd_hold_proc(struct proc *p); | struct pwd *pwd_hold_proc(struct proc *p); | |||||||||
struct pwd *pwd_hold(struct thread *td); | struct pwd *pwd_hold(struct thread *td); | |||||||||
void pwd_drop(struct pwd *pwd); | void pwd_drop(struct pwd *pwd); | |||||||||
Show All 11 Lines |