Changeset View
Changeset View
Standalone View
Standalone View
head/sys/kern/kern_conf.c
Show First 20 Lines • Show All 196 Lines • ▼ Show 20 Lines | dev_refthread(struct cdev *dev, int *ref) | ||||
if (csw != NULL) { | if (csw != NULL) { | ||||
cdp = cdev2priv(dev); | cdp = cdev2priv(dev); | ||||
if ((cdp->cdp_flags & CDP_SCHED_DTR) == 0) | if ((cdp->cdp_flags & CDP_SCHED_DTR) == 0) | ||||
atomic_add_long(&dev->si_threadcount, 1); | atomic_add_long(&dev->si_threadcount, 1); | ||||
else | else | ||||
csw = NULL; | csw = NULL; | ||||
} | } | ||||
dev_unlock(); | dev_unlock(); | ||||
if (csw != NULL) | |||||
*ref = 1; | *ref = 1; | ||||
return (csw); | return (csw); | ||||
} | } | ||||
struct cdevsw * | struct cdevsw * | ||||
devvn_refthread(struct vnode *vp, struct cdev **devp, int *ref) | devvn_refthread(struct vnode *vp, struct cdev **devp, int *ref) | ||||
{ | { | ||||
struct cdevsw *csw; | struct cdevsw *csw; | ||||
struct cdev_priv *cdp; | struct cdev_priv *cdp; | ||||
▲ Show 20 Lines • Show All 1,353 Lines • Show Last 20 Lines |