MCPcopy Create free account
hub / github.com/F-Stack/f-stack / delist_dev_locked

Function delist_dev_locked

freebsd/kern/kern_conf.c:1196–1215  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1194}
1195
1196static void
1197delist_dev_locked(struct cdev *dev)
1198{
1199 struct cdev_priv *cdp;
1200 struct cdev *child;
1201
1202 dev_lock_assert_locked();
1203 cdp = cdev2priv(dev);
1204 if ((cdp->cdp_flags & CDP_UNREF_DTR) != 0)
1205 return;
1206 cdp->cdp_flags |= CDP_UNREF_DTR;
1207 dev_refl(dev);
1208 devfs_destroy(dev);
1209 LIST_FOREACH(child, &dev->si_children, si_siblings)
1210 delist_dev_locked(child);
1211 dev_unlock();
1212 /* ensure the destroy event is queued in order */
1213 notify_destroy(dev);
1214 dev_lock();
1215}
1216
1217/*
1218 * This function will delist a character device and its children from

Callers 1

delist_devFunction · 0.85

Calls 4

dev_reflFunction · 0.85
dev_unlockFunction · 0.85
notify_destroyFunction · 0.85
dev_lockFunction · 0.85

Tested by

no test coverage detected