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

Function config_intrhook_establish

freebsd/kern/subr_autoconf.c:183–211  ·  view source on GitHub ↗

* Register a hook that will be called after "cold" * autoconfiguration is complete and interrupts can * be used to complete initialization. */

Source from the content-addressed store, hash-verified

181 * be used to complete initialization.
182 */
183int
184config_intrhook_establish(struct intr_config_hook *hook)
185{
186 struct intr_config_hook *hook_entry;
187
188 TSHOLD("config hooks");
189 mtx_lock(&intr_config_hook_lock);
190 TAILQ_FOREACH(hook_entry, &intr_config_hook_list, ich_links)
191 if (hook_entry == hook)
192 break;
193 if (hook_entry != NULL) {
194 mtx_unlock(&intr_config_hook_lock);
195 printf("config_intrhook_establish: establishing an "
196 "already established hook.\n");
197 return (1);
198 }
199 TAILQ_INSERT_TAIL(&intr_config_hook_list, hook, ich_links);
200 if (next_to_notify == NULL)
201 next_to_notify = hook;
202 mtx_unlock(&intr_config_hook_lock);
203 if (cold == 0)
204 /*
205 * XXX Call from a task since not all drivers expect
206 * to be re-entered at the time a hook is established.
207 */
208 /* XXX Sufficient for modules loaded after initial config??? */
209 run_interrupt_driven_config_hooks();
210 return (0);
211}
212
213/*
214 * Register a hook function that is automatically unregistered after it runs.

Callers 13

rk805_attachFunction · 0.85
twl_attachFunction · 0.85
twl_vreg_attachFunction · 0.85
twl_clks_attachFunction · 0.85
pl310_attachFunction · 0.85
a10hdmi_attachFunction · 0.85
axp2xx_attachFunction · 0.85
imx6_anatop_attachFunction · 0.85
host1x_new_passFunction · 0.85
bcm2835_cpufreq_attachFunction · 0.85
ft5406ts_attachFunction · 0.85
bcm2835_audio_attachFunction · 0.85

Calls 4

mtx_lockFunction · 0.70
mtx_unlockFunction · 0.70
printfFunction · 0.70

Tested by

no test coverage detected