FreeBSD kernel kern code
kern_conf.c File Reference
#include <sys/cdefs.h>
#include <sys/param.h>
#include <sys/kernel.h>
#include <sys/systm.h>
#include <sys/bus.h>
#include <sys/bio.h>
#include <sys/lock.h>
#include <sys/mutex.h>
#include <sys/module.h>
#include <sys/malloc.h>
#include <sys/conf.h>
#include <sys/vnode.h>
#include <sys/queue.h>
#include <sys/poll.h>
#include <sys/sx.h>
#include <sys/ctype.h>
#include <sys/ucred.h>
#include <sys/taskqueue.h>
#include <machine/stdarg.h>
#include <fs/devfs/devfs_int.h>
#include <vm/vm.h>
#include "opt_ddb.h"
Include dependency graph for kern_conf.c:

Go to the source code of this file.

Data Structures

struct  clonedevs
 

Macros

#define dead_open   (d_open_t *)enxio
 
#define dead_close   (d_close_t *)enxio
 
#define dead_read   (d_read_t *)enxio
 
#define dead_write   (d_write_t *)enxio
 
#define dead_ioctl   (d_ioctl_t *)enxio
 
#define dead_poll   (d_poll_t *)enodev
 
#define dead_mmap   (d_mmap_t *)enodev
 
#define dead_dump   (dumper_t *)enxio
 
#define dead_kqfilter   (d_kqfilter_t *)enxio
 
#define dead_mmap_single   (d_mmap_single_t *)enodev
 
#define null_open   (d_open_t *)nullop
 
#define null_close   (d_close_t *)nullop
 
#define no_read   (d_read_t *)enodev
 
#define no_write   (d_write_t *)enodev
 
#define no_ioctl   (d_ioctl_t *)enodev
 
#define no_mmap   (d_mmap_t *)enodev
 
#define no_kqfilter   (d_kqfilter_t *)enodev
 
#define no_mmap_single   (d_mmap_single_t *)enodev
 
#define no_dump   (dumper_t *)enodev
 
#define FIXUP(member, noop, giant)
 

Functions

 __FBSDID ("$BSDSUniX$")
 
static MALLOC_DEFINE (M_DEVT,"cdev","cdev storage")
 
static void destroy_devl (struct cdev *dev)
 
static int destroy_dev_sched_cbl (struct cdev *dev, void(*cb)(void *), void *arg)
 
static int make_dev_credv (int flags, struct cdev **dres, struct cdevsw *devsw, int unit, struct ucred *cr, uid_t uid, gid_t gid, int mode, const char *fmt, va_list ap)
 
static SLIST_HEAD (free_cdevsw, cdevsw)
 
static void dev_unlock_and_free (void)
 
static void dev_free_devlocked (struct cdev *cdev)
 
static void cdevsw_free_devlocked (struct cdevsw *csw)
 
void dev_unlock (void)
 
void dev_ref (struct cdev *dev)
 
void dev_refl (struct cdev *dev)
 
void dev_rel (struct cdev *dev)
 
struct cdevsw * dev_refthread (struct cdev *dev, int *ref)
 
struct cdevsw * devvn_refthread (struct vnode *vp, struct cdev **devp, int *ref)
 
void dev_relthread (struct cdev *dev, int ref)
 
int nullop (void)
 
int eopnotsupp (void)
 
static int enxio (void)
 
static int enodev (void)
 
static void dead_strategy (struct bio *bp)
 
static void no_strategy (struct bio *bp)
 
static int no_poll (struct cdev *dev __unused, int events, struct thread *td __unused)
 
static int giant_open (struct cdev *dev, int oflags, int devtype, struct thread *td)
 
static int giant_fdopen (struct cdev *dev, int oflags, struct thread *td, struct file *fp)
 
static int giant_close (struct cdev *dev, int fflag, int devtype, struct thread *td)
 
static void giant_strategy (struct bio *bp)
 
static int giant_ioctl (struct cdev *dev, u_long cmd, caddr_t data, int fflag, struct thread *td)
 
static int giant_read (struct cdev *dev, struct uio *uio, int ioflag)
 
static int giant_write (struct cdev *dev, struct uio *uio, int ioflag)
 
static int giant_poll (struct cdev *dev, int events, struct thread *td)
 
static int giant_kqfilter (struct cdev *dev, struct knote *kn)
 
static int giant_mmap (struct cdev *dev, vm_ooffset_t offset, vm_paddr_t *paddr, int nprot, vm_memattr_t *memattr)
 
static int giant_mmap_single (struct cdev *dev, vm_ooffset_t *offset, vm_size_t size, vm_object_t *object, int nprot)
 
static void notify (struct cdev *dev, const char *ev, int flags)
 
static void notify_create (struct cdev *dev, int flags)
 
static void notify_destroy (struct cdev *dev)
 
static struct cdev * newdev (struct cdevsw *csw, int unit, struct cdev *si)
 
static void fini_cdevsw (struct cdevsw *devsw)
 
static int prep_cdevsw (struct cdevsw *devsw, int flags)
 
static int prep_devname (struct cdev *dev, const char *fmt, va_list ap)
 
struct cdev * make_dev (struct cdevsw *devsw, int unit, uid_t uid, gid_t gid, int mode, const char *fmt,...)
 
struct cdev * make_dev_cred (struct cdevsw *devsw, int unit, struct ucred *cr, uid_t uid, gid_t gid, int mode, const char *fmt,...)
 
struct cdev * make_dev_credf (int flags, struct cdevsw *devsw, int unit, struct ucred *cr, uid_t uid, gid_t gid, int mode, const char *fmt,...)
 
int make_dev_p (int flags, struct cdev **cdev, struct cdevsw *devsw, struct ucred *cr, uid_t uid, gid_t gid, int mode, const char *fmt,...)
 
static void dev_dependsl (struct cdev *pdev, struct cdev *cdev)
 
void dev_depends (struct cdev *pdev, struct cdev *cdev)
 
static int make_dev_alias_v (int flags, struct cdev **cdev, struct cdev *pdev, const char *fmt, va_list ap)
 
struct cdev * make_dev_alias (struct cdev *pdev, const char *fmt,...)
 
int make_dev_alias_p (int flags, struct cdev **cdev, struct cdev *pdev, const char *fmt,...)
 
int make_dev_physpath_alias (int flags, struct cdev **cdev, struct cdev *pdev, struct cdev *old_alias, const char *physpath)
 
static void delist_dev_locked (struct cdev *dev)
 
void delist_dev (struct cdev *dev)
 
void destroy_dev (struct cdev *dev)
 
const char * devtoname (struct cdev *dev)
 
int dev_stdclone (char *name, char **namep, const char *stem, int *unit)
 
void clone_setup (struct clonedevs **cdp)
 
int clone_create (struct clonedevs **cdp, struct cdevsw *csw, int *up, struct cdev **dp, int extra)
 
void clone_cleanup (struct clonedevs **cdp)
 
static TAILQ_HEAD (cdev_priv)
 
int destroy_dev_sched_cb (struct cdev *dev, void(*cb)(void *), void *arg)
 
int destroy_dev_sched (struct cdev *dev)
 
void destroy_dev_drain (struct cdevsw *csw)
 
void drain_dev_clone_events (void)
 
static void devdtr_init (void *dummy __unused)
 
 SYSINIT (devdtr, SI_SUB_DEVFS, SI_ORDER_SECOND, devdtr_init, NULL)
 

Variables

struct mtx devmtx
 
static struct cdev_priv_list cdevp_free_list
 
static struct cdevsw dead_cdevsw
 

Macro Definition Documentation

#define dead_close   (d_close_t *)enxio

Definition at line 291 of file kern_conf.c.

Referenced by prep_cdevsw().

#define dead_dump   (dumper_t *)enxio

Definition at line 305 of file kern_conf.c.

Referenced by prep_cdevsw().

#define dead_ioctl   (d_ioctl_t *)enxio

Definition at line 294 of file kern_conf.c.

Referenced by prep_cdevsw().

#define dead_kqfilter   (d_kqfilter_t *)enxio

Definition at line 306 of file kern_conf.c.

Referenced by prep_cdevsw().

#define dead_mmap   (d_mmap_t *)enodev

Definition at line 296 of file kern_conf.c.

Referenced by prep_cdevsw().

#define dead_mmap_single   (d_mmap_single_t *)enodev

Definition at line 307 of file kern_conf.c.

Referenced by prep_cdevsw().

#define dead_open   (d_open_t *)enxio

Definition at line 290 of file kern_conf.c.

Referenced by prep_cdevsw().

#define dead_poll   (d_poll_t *)enodev

Definition at line 295 of file kern_conf.c.

Referenced by prep_cdevsw().

#define dead_read   (d_read_t *)enxio

Definition at line 292 of file kern_conf.c.

Referenced by prep_cdevsw().

#define dead_write   (d_write_t *)enxio

Definition at line 293 of file kern_conf.c.

Referenced by prep_cdevsw().

#define FIXUP (   member,
  noop,
  giant 
)
Value:
do { \
if (devsw->member == NULL) { \
devsw->member = noop; \
} else if (devsw->d_flags & D_NEEDGIANT) \
devsw->member = giant; \
} \
while (0)

Referenced by prep_cdevsw().

#define no_dump   (dumper_t *)enodev

Definition at line 350 of file kern_conf.c.

Referenced by prep_cdevsw().

#define no_ioctl   (d_ioctl_t *)enodev

Definition at line 331 of file kern_conf.c.

Referenced by prep_cdevsw().

#define no_kqfilter   (d_kqfilter_t *)enodev

Definition at line 333 of file kern_conf.c.

Referenced by prep_cdevsw().

#define no_mmap   (d_mmap_t *)enodev

Definition at line 332 of file kern_conf.c.

Referenced by prep_cdevsw().

#define no_mmap_single   (d_mmap_single_t *)enodev

Definition at line 334 of file kern_conf.c.

Referenced by prep_cdevsw().

#define no_read   (d_read_t *)enodev

Definition at line 329 of file kern_conf.c.

Referenced by prep_cdevsw().

#define no_write   (d_write_t *)enodev

Definition at line 330 of file kern_conf.c.

Referenced by prep_cdevsw().

#define null_close   (d_close_t *)nullop

Definition at line 328 of file kern_conf.c.

Referenced by prep_cdevsw().

#define null_open   (d_open_t *)nullop

Definition at line 327 of file kern_conf.c.

Referenced by prep_cdevsw().

Function Documentation

__FBSDID ( "$BSDSUniX$"  )
static void cdevsw_free_devlocked ( struct cdevsw *  csw)
static

Definition at line 124 of file kern_conf.c.

References devmtx.

Referenced by fini_cdevsw(), and prep_cdevsw().

Here is the caller graph for this function:

void clone_cleanup ( struct clonedevs **  cdp)

Definition at line 1324 of file kern_conf.c.

References destroy_devl(), dev_unlock_and_free(), and free().

Here is the call graph for this function:

int clone_create ( struct clonedevs **  cdp,
struct cdevsw *  csw,
int *  up,
struct cdev **  dp,
int  extra 
)

Definition at line 1240 of file kern_conf.c.

References dev_unlock(), dev_unlock_and_free(), newdev(), panic(), prep_cdevsw(), and printf().

Here is the call graph for this function:

void clone_setup ( struct clonedevs **  cdp)

Definition at line 1232 of file kern_conf.c.

References malloc().

Here is the call graph for this function:

static void dead_strategy ( struct bio *  bp)
static

Definition at line 299 of file kern_conf.c.

References biofinish().

Referenced by prep_cdevsw().

Here is the call graph for this function:

Here is the caller graph for this function:

void delist_dev ( struct cdev *  dev)

Definition at line 1157 of file kern_conf.c.

References delist_dev_locked(), and dev_unlock().

Here is the call graph for this function:

static void delist_dev_locked ( struct cdev *  dev)
static

Definition at line 1128 of file kern_conf.c.

References dev_refl(), dev_unlock(), devmtx, and notify_destroy().

Referenced by delist_dev().

Here is the call graph for this function:

Here is the caller graph for this function:

void destroy_dev ( struct cdev *  dev)

Definition at line 1167 of file kern_conf.c.

References destroy_devl(), and dev_unlock_and_free().

Referenced by make_dev_physpath_alias().

Here is the call graph for this function:

Here is the caller graph for this function:

void destroy_dev_drain ( struct cdevsw *  csw)

Definition at line 1425 of file kern_conf.c.

References dev_unlock(), devmtx, and hz.

Here is the call graph for this function:

int destroy_dev_sched ( struct cdev *  dev)

Definition at line 1418 of file kern_conf.c.

References destroy_dev_sched_cb().

Referenced by ptsdrv_free().

Here is the call graph for this function:

Here is the caller graph for this function:

int destroy_dev_sched_cb ( struct cdev *  dev,
void(*)(void *)  cb,
void *  arg 
)

Definition at line 1410 of file kern_conf.c.

References destroy_dev_sched_cbl().

Referenced by destroy_dev_sched(), and tty_rel_free().

Here is the call graph for this function:

Here is the caller graph for this function:

static int destroy_dev_sched_cbl ( struct cdev *  dev,
void(*)(void *)  cb,
void *  arg 
)
static

Definition at line 1389 of file kern_conf.c.

References dev_refl(), dev_unlock(), devmtx, and taskqueue_enqueue().

Referenced by destroy_dev_sched_cb().

Here is the call graph for this function:

Here is the caller graph for this function:

static void destroy_devl ( struct cdev *  dev)
static

Definition at line 1031 of file kern_conf.c.

References dev_free_devlocked(), dev_refl(), dev_unlock(), devmtx, devtoname(), fini_cdevsw(), hz, notify_destroy(), printf(), and wakeup().

Referenced by clone_cleanup(), destroy_dev(), and TAILQ_HEAD().

Here is the call graph for this function:

Here is the caller graph for this function:

void dev_depends ( struct cdev *  pdev,
struct cdev *  cdev 
)

Definition at line 890 of file kern_conf.c.

References dev_dependsl(), and dev_unlock().

Referenced by tty_makedev().

Here is the call graph for this function:

Here is the caller graph for this function:

static void dev_dependsl ( struct cdev *  pdev,
struct cdev *  cdev 
)
static

Definition at line 880 of file kern_conf.c.

Referenced by dev_depends(), and make_dev_alias_v().

Here is the caller graph for this function:

static void dev_free_devlocked ( struct cdev *  cdev)
static

Definition at line 112 of file kern_conf.c.

References devmtx.

Referenced by destroy_devl(), and newdev().

Here is the caller graph for this function:

void dev_ref ( struct cdev *  dev)

Definition at line 139 of file kern_conf.c.

References devmtx.

void dev_refl ( struct cdev *  dev)

Definition at line 149 of file kern_conf.c.

References devmtx.

Referenced by ctty_clone(), delist_dev_locked(), destroy_dev_sched_cbl(), destroy_devl(), and make_dev_credv().

Here is the caller graph for this function:

struct cdevsw* dev_refthread ( struct cdev *  dev,
int *  ref 
)

Definition at line 182 of file kern_conf.c.

References dev_unlock(), and devmtx.

Referenced by dev_strategy(), giant_close(), giant_fdopen(), giant_ioctl(), giant_kqfilter(), giant_mmap(), giant_mmap_single(), giant_open(), giant_poll(), giant_read(), giant_strategy(), and giant_write().

Here is the call graph for this function:

Here is the caller graph for this function:

void dev_rel ( struct cdev *  dev)

Definition at line 157 of file kern_conf.c.

References dev_unlock(), devmtx, devtoname(), and flag.

Referenced by TAILQ_HEAD().

Here is the call graph for this function:

Here is the caller graph for this function:

void dev_relthread ( struct cdev *  dev,
int  ref 
)

Definition at line 249 of file kern_conf.c.

References dev_unlock(), and devmtx.

Referenced by aio_qphysio(), dev_strategy(), giant_close(), giant_fdopen(), giant_ioctl(), giant_kqfilter(), giant_mmap(), giant_mmap_single(), giant_open(), giant_poll(), giant_read(), giant_strategy(), giant_write(), and ttyhook_register().

Here is the call graph for this function:

Here is the caller graph for this function:

int dev_stdclone ( char *  name,
char **  namep,
const char *  stem,
int *  unit 
)

Definition at line 1184 of file kern_conf.c.

static void dev_unlock_and_free ( void  )
static

Definition at line 81 of file kern_conf.c.

References devmtx, and free().

Referenced by clone_cleanup(), clone_create(), destroy_dev(), make_dev_credv(), and TAILQ_HEAD().

Here is the call graph for this function:

Here is the caller graph for this function:

static void devdtr_init ( void *dummy  __unused)
static

Definition at line 1444 of file kern_conf.c.

const char* devtoname ( struct cdev *  dev)

Definition at line 1177 of file kern_conf.c.

Referenced by destroy_devl(), dev_rel(), dev_strategy(), dev_strategy_csw(), disk_err(), make_dev_credv(), and physio().

Here is the caller graph for this function:

struct cdevsw* devvn_refthread ( struct vnode *  vp,
struct cdev **  devp,
int *  ref 
)

Definition at line 207 of file kern_conf.c.

References dev_unlock(), and devmtx.

Referenced by aio_qphysio(), and ttyhook_register().

Here is the call graph for this function:

Here is the caller graph for this function:

void drain_dev_clone_events ( void  )

Definition at line 1436 of file kern_conf.c.

static int enodev ( void  )
static

Definition at line 283 of file kern_conf.c.

static int enxio ( void  )
static

Definition at line 277 of file kern_conf.c.

int eopnotsupp ( void  )

Definition at line 270 of file kern_conf.c.

static void fini_cdevsw ( struct cdevsw *  devsw)
static

Definition at line 591 of file kern_conf.c.

References cdevsw_free_devlocked().

Referenced by destroy_devl().

Here is the call graph for this function:

Here is the caller graph for this function:

static int giant_close ( struct cdev *  dev,
int  fflag,
int  devtype,
struct thread *  td 
)
static

Definition at line 385 of file kern_conf.c.

References dev_refthread(), dev_relthread(), and Giant.

Referenced by prep_cdevsw().

Here is the call graph for this function:

Here is the caller graph for this function:

static int giant_fdopen ( struct cdev *  dev,
int  oflags,
struct thread *  td,
struct file *  fp 
)
static

Definition at line 369 of file kern_conf.c.

References dev_refthread(), dev_relthread(), and Giant.

Referenced by prep_cdevsw().

Here is the call graph for this function:

Here is the caller graph for this function:

static int giant_ioctl ( struct cdev *  dev,
u_long  cmd,
caddr_t  data,
int  fflag,
struct thread *  td 
)
static

Definition at line 420 of file kern_conf.c.

References dev_refthread(), dev_relthread(), and Giant.

Referenced by prep_cdevsw().

Here is the call graph for this function:

Here is the caller graph for this function:

static int giant_kqfilter ( struct cdev *  dev,
struct knote kn 
)
static

Definition at line 484 of file kern_conf.c.

References dev_refthread(), dev_relthread(), and Giant.

Referenced by prep_cdevsw().

Here is the call graph for this function:

Here is the caller graph for this function:

static int giant_mmap ( struct cdev *  dev,
vm_ooffset_t  offset,
vm_paddr_t *  paddr,
int  nprot,
vm_memattr_t *  memattr 
)
static

Definition at line 500 of file kern_conf.c.

References dev_refthread(), dev_relthread(), and Giant.

Referenced by prep_cdevsw().

Here is the call graph for this function:

Here is the caller graph for this function:

static int giant_mmap_single ( struct cdev *  dev,
vm_ooffset_t *  offset,
vm_size_t  size,
vm_object_t *  object,
int  nprot 
)
static

Definition at line 518 of file kern_conf.c.

References dev_refthread(), dev_relthread(), and Giant.

Referenced by prep_cdevsw().

Here is the call graph for this function:

Here is the caller graph for this function:

static int giant_open ( struct cdev *  dev,
int  oflags,
int  devtype,
struct thread *  td 
)
static

Definition at line 353 of file kern_conf.c.

References dev_refthread(), dev_relthread(), and Giant.

Referenced by prep_cdevsw().

Here is the call graph for this function:

Here is the caller graph for this function:

static int giant_poll ( struct cdev *  dev,
int  events,
struct thread *  td 
)
static

Definition at line 468 of file kern_conf.c.

References dev_refthread(), dev_relthread(), and Giant.

Referenced by prep_cdevsw().

Here is the call graph for this function:

Here is the caller graph for this function:

static int giant_read ( struct cdev *  dev,
struct uio *  uio,
int  ioflag 
)
static

Definition at line 436 of file kern_conf.c.

References dev_refthread(), dev_relthread(), and Giant.

Referenced by prep_cdevsw().

Here is the call graph for this function:

Here is the caller graph for this function:

static void giant_strategy ( struct bio *  bp)
static

Definition at line 401 of file kern_conf.c.

References biofinish(), dev_refthread(), dev_relthread(), and Giant.

Referenced by prep_cdevsw().

Here is the call graph for this function:

Here is the caller graph for this function:

static int giant_write ( struct cdev *  dev,
struct uio *  uio,
int  ioflag 
)
static

Definition at line 452 of file kern_conf.c.

References dev_refthread(), dev_relthread(), and Giant.

Referenced by prep_cdevsw().

Here is the call graph for this function:

Here is the caller graph for this function:

struct cdev* make_dev ( struct cdevsw *  devsw,
int  unit,
uid_t  uid,
gid_t  gid,
int  mode,
const char *  fmt,
  ... 
)

Definition at line 809 of file kern_conf.c.

References make_dev_credv().

Here is the call graph for this function:

struct cdev* make_dev_alias ( struct cdev *  pdev,
const char *  fmt,
  ... 
)

Definition at line 940 of file kern_conf.c.

References make_dev_alias_v().

Referenced by fildesc_drvinit().

Here is the call graph for this function:

Here is the caller graph for this function:

int make_dev_alias_p ( int  flags,
struct cdev **  cdev,
struct cdev *  pdev,
const char *  fmt,
  ... 
)

Definition at line 956 of file kern_conf.c.

References make_dev_alias_v().

Referenced by make_dev_physpath_alias().

Here is the call graph for this function:

Here is the caller graph for this function:

static int make_dev_alias_v ( int  flags,
struct cdev **  cdev,
struct cdev *  pdev,
const char *  fmt,
va_list  ap 
)
static

Definition at line 899 of file kern_conf.c.

References clean_unrhdrl(), dev_dependsl(), dev_unlock(), notify_create(), panic(), and prep_devname().

Referenced by make_dev_alias(), and make_dev_alias_p().

Here is the call graph for this function:

Here is the caller graph for this function:

struct cdev* make_dev_cred ( struct cdevsw *  devsw,
int  unit,
struct ucred *  cr,
uid_t  uid,
gid_t  gid,
int  mode,
const char *  fmt,
  ... 
)

Definition at line 826 of file kern_conf.c.

References make_dev_credv().

Referenced by tty_makedev().

Here is the call graph for this function:

Here is the caller graph for this function:

struct cdev* make_dev_credf ( int  flags,
struct cdevsw *  devsw,
int  unit,
struct ucred *  cr,
uid_t  uid,
gid_t  gid,
int  mode,
const char *  fmt,
  ... 
)

Definition at line 843 of file kern_conf.c.

References make_dev_credv().

Referenced by ctty_drvinit(), devinit(), devstat_alloc(), fildesc_drvinit(), log_drvinit(), and ttyconsdev_init().

Here is the call graph for this function:

Here is the caller graph for this function:

static int make_dev_credv ( int  flags,
struct cdev **  dres,
struct cdevsw *  devsw,
int  unit,
struct ucred *  cr,
uid_t  uid,
gid_t  gid,
int  mode,
const char *  fmt,
va_list  ap 
)
static

Definition at line 736 of file kern_conf.c.

References clean_unrhdrl(), crhold(), dev_refl(), dev_unlock(), dev_unlock_and_free(), devtoname(), mode, newdev(), notify_create(), panic(), prep_cdevsw(), and prep_devname().

Referenced by make_dev(), make_dev_cred(), make_dev_credf(), and make_dev_p().

Here is the call graph for this function:

Here is the caller graph for this function:

int make_dev_p ( int  flags,
struct cdev **  cdev,
struct cdevsw *  devsw,
struct ucred *  cr,
uid_t  uid,
gid_t  gid,
int  mode,
const char *  fmt,
  ... 
)

Definition at line 862 of file kern_conf.c.

References make_dev_credv().

Here is the call graph for this function:

int make_dev_physpath_alias ( int  flags,
struct cdev **  cdev,
struct cdev *  pdev,
struct cdev *  old_alias,
const char *  physpath 
)

Definition at line 969 of file kern_conf.c.

References destroy_dev(), free(), make_dev_alias_p(), malloc(), and sprintf().

Here is the call graph for this function:

static MALLOC_DEFINE ( M_DEVT  ,
"cdev"  ,
"cdev storage"   
)
static
static struct cdev* newdev ( struct cdevsw *  csw,
int  unit,
struct cdev *  si 
)
static

Definition at line 570 of file kern_conf.c.

References dev_free_devlocked(), and devmtx.

Referenced by clone_create(), and make_dev_credv().

Here is the call graph for this function:

Here is the caller graph for this function:

static int no_poll ( struct cdev *dev  __unused,
int  events,
struct thread *td  __unused 
)
static

Definition at line 344 of file kern_conf.c.

References poll_no_poll().

Referenced by prep_cdevsw().

Here is the call graph for this function:

Here is the caller graph for this function:

static void no_strategy ( struct bio *  bp)
static

Definition at line 337 of file kern_conf.c.

References biofinish().

Referenced by prep_cdevsw().

Here is the call graph for this function:

Here is the caller graph for this function:

static void notify ( struct cdev *  dev,
const char *  ev,
int  flags 
)
static

Definition at line 536 of file kern_conf.c.

References devctl_notify_f(), free(), and malloc().

Referenced by notify_create(), and notify_destroy().

Here is the call graph for this function:

Here is the caller graph for this function:

static void notify_create ( struct cdev *  dev,
int  flags 
)
static

Definition at line 556 of file kern_conf.c.

References notify().

Referenced by make_dev_alias_v(), and make_dev_credv().

Here is the call graph for this function:

Here is the caller graph for this function:

static void notify_destroy ( struct cdev *  dev)
static

Definition at line 563 of file kern_conf.c.

References notify().

Referenced by delist_dev_locked(), and destroy_devl().

Here is the call graph for this function:

Here is the caller graph for this function:

int nullop ( void  )

Definition at line 263 of file kern_conf.c.

static int prep_devname ( struct cdev *  dev,
const char *  fmt,
va_list  ap 
)
static

Definition at line 686 of file kern_conf.c.

References devmtx, and vsnrprintf().

Referenced by make_dev_alias_v(), and make_dev_credv().

Here is the call graph for this function:

Here is the caller graph for this function:

static SLIST_HEAD ( free_cdevsw  ,
cdevsw   
)
static

Definition at line 64 of file kern_conf.c.

References devmtx.

SYSINIT ( devdtr  ,
SI_SUB_DEVFS  ,
SI_ORDER_SECOND  ,
devdtr_init  ,
NULL   
)
static TAILQ_HEAD ( cdev_priv  )
static

Definition at line 1353 of file kern_conf.c.

References destroy_devl(), dev_rel(), dev_unlock(), and dev_unlock_and_free().

Here is the call graph for this function:

Variable Documentation

struct cdev_priv_list cdevp_free_list
static
Initial value:
=
TAILQ_HEAD_INITIALIZER(cdevp_free_list)
static struct cdev_priv_list cdevp_free_list
Definition: kern_conf.c:62

Definition at line 62 of file kern_conf.c.

struct cdevsw dead_cdevsw
static
Initial value:
= {
.d_version = D_VERSION,
.d_open = dead_open,
.d_close = dead_close,
.d_read = dead_read,
.d_write = dead_write,
.d_ioctl = dead_ioctl,
.d_poll = dead_poll,
.d_mmap = dead_mmap,
.d_strategy = dead_strategy,
.d_name = "dead",
.d_dump = dead_dump,
.d_kqfilter = dead_kqfilter,
.d_mmap_single = dead_mmap_single
}
#define dead_mmap_single
Definition: kern_conf.c:307
#define dead_open
Definition: kern_conf.c:290
#define dead_dump
Definition: kern_conf.c:305
#define dead_mmap
Definition: kern_conf.c:296
#define dead_ioctl
Definition: kern_conf.c:294
#define dead_close
Definition: kern_conf.c:291
#define dead_read
Definition: kern_conf.c:292
#define dead_kqfilter
Definition: kern_conf.c:306
#define dead_poll
Definition: kern_conf.c:295
static void dead_strategy(struct bio *bp)
Definition: kern_conf.c:299
#define dead_write
Definition: kern_conf.c:293

Definition at line 309 of file kern_conf.c.