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

Function et_find

freebsd/kern/kern_et.c:137–154  ·  view source on GitHub ↗

* Find free event timer hardware with specified parameters. */

Source from the content-addressed store, hash-verified

135 * Find free event timer hardware with specified parameters.
136 */
137struct eventtimer *
138et_find(const char *name, int check, int want)
139{
140 struct eventtimer *et = NULL;
141
142 SLIST_FOREACH(et, &eventtimers, et_all) {
143 if (et->et_active)
144 continue;
145 if (name != NULL && strcasecmp(et->et_name, name) != 0)
146 continue;
147 if (name == NULL && et->et_quality < 0)
148 continue;
149 if ((et->et_flags & check) != want)
150 continue;
151 break;
152 }
153 return (et);
154}
155
156/*
157 * Initialize event timer hardware. Set callbacks.

Callers 2

cpu_initclocks_bspFunction · 0.85

Calls 1

strcasecmpFunction · 0.85

Tested by

no test coverage detected