sys/kern/subr_autoconf.c
/*
 * Register a hook that will be called after "cold"
 * autoconfiguration is complete and interrupts can
 * be used to complete initialization.
 */
Register a hook that will be called after "cold"
autoconfiguration is complete and interrupts can
be used to complete initialization.
Register a hook that will be called after " cold " autoconfiguration is complete and interrupts can be used to complete initialization .
int
config_intrhook_establish(struct intr_config_hook *hook)
{
	struct intr_config_hook *hook_entry;
	mtx_lock(&intr_config_hook_lock);
	TAILQ_FOREACH(hook_entry, &intr_config_hook_list, ich_links)
		if (hook_entry == hook)
			break;
	if (hook_entry != NULL) {
		mtx_unlock(&intr_config_hook_lock);
		printf("config_intrhook_establish: establishing an "
		       "already established hook.\n");
		return (1);
	}
	TAILQ_INSERT_TAIL(&intr_config_hook_list, hook, ich_links);
	if (next_to_notify == NULL)
		next_to_notify = hook;
	mtx_unlock(&intr_config_hook_lock);
	if (cold == 0)
		run_interrupt_driven_config_hooks();	
	return (0);
}
int config_intrhook_establish ( struct intr_config_hook * hook ) { struct intr_config_hook * hook_entry ; mtx_lock ( & intr_config_hook_lock ) ; TAILQ_FOREACH ( hook_entry , & intr_config_hook_list , ich_links ) if ( hook_entry == hook ) break ; if ( hook_entry != NULL ) { mtx_unlock ( & intr_config_hook_lock ) ; printf ( " " " \n " ) ; return ( 1 ) ; } TAILQ_INSERT_TAIL ( & intr_config_hook_list , hook , ich_links ) ; if ( next_to_notify == NULL ) next_to_notify = hook ; mtx_unlock ( & intr_config_hook_lock ) ; if ( cold == 0 ) run_interrupt_driven_config_hooks ( ) ; return ( 0 ) ; }
Register a hook that will be called after "cold"
 autoconfiguration is complete and interrupts can
 be used to complete initialization.
Register a hook that will be called after " cold " autoconfiguration is complete and interrupts can be used to complete initialization .
/*
		 * XXX Call from a task since not all drivers expect
		 *     to be re-entered at the time a hook is established.
		 */ /* XXX Sufficient for modules loaded after initial config??? */