Changeset View
Changeset View
Standalone View
Standalone View
sys/fs/devfs/devfs_int.h
Show All 31 Lines | |||||
* by kern/kern_conf.c and fs/devfs/... | * by kern/kern_conf.c and fs/devfs/... | ||||
*/ | */ | ||||
#ifndef _FS_DEVFS_DEVFS_INT_H_ | #ifndef _FS_DEVFS_DEVFS_INT_H_ | ||||
#define _FS_DEVFS_DEVFS_INT_H_ | #define _FS_DEVFS_DEVFS_INT_H_ | ||||
#include <sys/queue.h> | #include <sys/queue.h> | ||||
#ifdef _KERNEL | |||||
struct devfs_dirent; | struct devfs_dirent; | ||||
struct devfs_mount; | struct devfs_mount; | ||||
struct cdev_privdata { | struct cdev_privdata { | ||||
struct file *cdpd_fp; | struct file *cdpd_fp; | ||||
void *cdpd_data; | void *cdpd_data; | ||||
void (*cdpd_dtr)(void *); | void (*cdpd_dtr)(void *); | ||||
LIST_ENTRY(cdev_privdata) cdpd_list; | LIST_ENTRY(cdev_privdata) cdpd_list; | ||||
Show All 20 Lines | #define CDP_UNREF_DTR (1 << 2) | ||||
void *cdp_dtr_cb_arg; | void *cdp_dtr_cb_arg; | ||||
LIST_HEAD(, cdev_privdata) cdp_fdpriv; | LIST_HEAD(, cdev_privdata) cdp_fdpriv; | ||||
struct mtx cdp_threadlock; | struct mtx cdp_threadlock; | ||||
}; | }; | ||||
#define cdev2priv(c) __containerof(c, struct cdev_priv, cdp_c) | #define cdev2priv(c) __containerof(c, struct cdev_priv, cdp_c) | ||||
#ifdef _KERNEL | |||||
struct cdev *devfs_alloc(int); | struct cdev *devfs_alloc(int); | ||||
int devfs_dev_exists(const char *); | int devfs_dev_exists(const char *); | ||||
void devfs_free(struct cdev *); | void devfs_free(struct cdev *); | ||||
void devfs_create(struct cdev *); | void devfs_create(struct cdev *); | ||||
void devfs_destroy(struct cdev *); | void devfs_destroy(struct cdev *); | ||||
void devfs_destroy_cdevpriv(struct cdev_privdata *); | void devfs_destroy_cdevpriv(struct cdev_privdata *); | ||||
Show All 18 Lines |