1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-12-21 11:13:30 +00:00

Use TASK_INITIALIZER() for dev_dtr_task rather than a dedicated SYSINIT().

This commit is contained in:
John Baldwin 2011-12-22 16:01:10 +00:00
parent 2d0d326d91
commit 268e76d86e
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=228804

View File

@ -55,6 +55,7 @@ struct mtx devmtx;
static void destroy_devl(struct cdev *dev);
static int destroy_dev_sched_cbl(struct cdev *dev,
void (*cb)(void *), void *arg);
static void destroy_dev_tq(void *ctx, int pending);
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);
@ -1298,7 +1299,7 @@ clone_cleanup(struct clonedevs **cdp)
static TAILQ_HEAD(, cdev_priv) dev_ddtr =
TAILQ_HEAD_INITIALIZER(dev_ddtr);
static struct task dev_dtr_task;
static struct task dev_dtr_task = TASK_INITIALIZER(0, destroy_dev_tq, NULL);
static void
destroy_dev_tq(void *ctx, int pending)
@ -1386,15 +1387,6 @@ drain_dev_clone_events(void)
sx_xunlock(&clone_drain_lock);
}
static void
devdtr_init(void *dummy __unused)
{
TASK_INIT(&dev_dtr_task, 0, destroy_dev_tq, NULL);
}
SYSINIT(devdtr, SI_SUB_DEVFS, SI_ORDER_SECOND, devdtr_init, NULL);
#include "opt_ddb.h"
#ifdef DDB
#include <sys/kernel.h>