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

Function driver_register_pass

freebsd/kern/subr_bus.c:882–905  ·  view source on GitHub ↗

* @internal * @brief Register the pass level of a new driver attachment * * Register a new driver attachment's pass level. If no driver * attachment with the same pass level has been added, then @p new * will be added to the global passes list. * * @param new the new driver attachment */

Source from the content-addressed store, hash-verified

880 * @param new the new driver attachment
881 */
882static void
883driver_register_pass(struct driverlink *new)
884{
885 struct driverlink *dl;
886
887 /* We only consider pass numbers during boot. */
888 if (bus_current_pass == BUS_PASS_DEFAULT)
889 return;
890
891 /*
892 * Walk the passes list. If we already know about this pass
893 * then there is nothing to do. If we don't, then insert this
894 * driver link into the list.
895 */
896 TAILQ_FOREACH(dl, &passes, passlink) {
897 if (dl->pass < new->pass)
898 continue;
899 if (dl->pass == new->pass)
900 return;
901 TAILQ_INSERT_BEFORE(dl, new, passlink);
902 return;
903 }
904 TAILQ_INSERT_TAIL(&passes, new, passlink);
905}
906
907/**
908 * @brief Raise the current bus pass

Callers 1

devclass_add_driverFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected