Changeset View
Changeset View
Standalone View
Standalone View
sys/fs/devfs/devfs.h
Show First 20 Lines • Show All 118 Lines • ▼ Show 20 Lines | |||||
/* XXX: DEVFSIO_RS_GET_INFO for refcount, active if any, etc. */ | /* XXX: DEVFSIO_RS_GET_INFO for refcount, active if any, etc. */ | ||||
#ifdef _KERNEL | #ifdef _KERNEL | ||||
#ifdef MALLOC_DECLARE | #ifdef MALLOC_DECLARE | ||||
MALLOC_DECLARE(M_DEVFS); | MALLOC_DECLARE(M_DEVFS); | ||||
#endif | #endif | ||||
#endif /* _KERNEL */ | |||||
struct componentname; | struct componentname; | ||||
TAILQ_HEAD(devfs_dlist_head, devfs_dirent); | TAILQ_HEAD(devfs_dlist_head, devfs_dirent); | ||||
struct devfs_dirent { | struct devfs_dirent { | ||||
struct cdev_priv *de_cdp; | struct cdev_priv *de_cdp; | ||||
int de_inode; | int de_inode; | ||||
int de_flags; | int de_flags; | ||||
Show All 16 Lines | #define DE_USER 0x20 | ||||
struct timespec de_atime; | struct timespec de_atime; | ||||
struct timespec de_mtime; | struct timespec de_mtime; | ||||
struct timespec de_ctime; | struct timespec de_ctime; | ||||
struct vnode *de_vnode; | struct vnode *de_vnode; | ||||
char *de_symlink; | char *de_symlink; | ||||
int de_usecount; | int de_usecount; | ||||
}; | }; | ||||
#include <sys/_lock.h> | |||||
#include <sys/_sx.h> | |||||
struct devfs_mount { | struct devfs_mount { | ||||
u_int dm_idx; | u_int dm_idx; | ||||
struct mount *dm_mount; | struct mount *dm_mount; | ||||
struct devfs_dirent *dm_rootdir; | struct devfs_dirent *dm_rootdir; | ||||
unsigned dm_generation; | unsigned dm_generation; | ||||
int dm_holdcnt; | int dm_holdcnt; | ||||
struct sx dm_lock; | struct sx dm_lock; | ||||
devfs_rsnum dm_ruleset; | devfs_rsnum dm_ruleset; | ||||
}; | }; | ||||
#define DEVFS_ROOTINO 2 | #define DEVFS_ROOTINO 2 | ||||
#ifdef _KERNEL | |||||
extern unsigned devfs_rule_depth; | extern unsigned devfs_rule_depth; | ||||
#define VFSTODEVFS(mp) ((struct devfs_mount *)((mp)->mnt_data)) | #define VFSTODEVFS(mp) ((struct devfs_mount *)((mp)->mnt_data)) | ||||
#define DEVFS_DE_HOLD(de) ((de)->de_holdcnt++) | #define DEVFS_DE_HOLD(de) ((de)->de_holdcnt++) | ||||
#define DEVFS_DE_DROP(de) (--(de)->de_holdcnt == 0) | #define DEVFS_DE_DROP(de) (--(de)->de_holdcnt == 0) | ||||
Show All 36 Lines |