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

Function clock_unregister

freebsd/kern/subr_rtc.c:256–274  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

254}
255
256void
257clock_unregister(device_t clockdev)
258{
259 struct rtc_instance *rtc, *tmp;
260
261 sx_xlock(&rtc_list_lock);
262 LIST_FOREACH_SAFE(rtc, &rtc_list, rtc_entries, tmp) {
263 if (rtc->clockdev == clockdev) {
264 LIST_REMOVE(rtc, rtc_entries);
265 break;
266 }
267 }
268 sx_xunlock(&rtc_list_lock);
269 if (rtc != NULL) {
270 taskqueue_cancel_timeout(taskqueue_thread, &rtc->stask, NULL);
271 taskqueue_drain_timeout(taskqueue_thread, &rtc->stask);
272 free(rtc, M_DEVBUF);
273 }
274}
275
276void
277clock_schedule(device_t clockdev, u_int offsetns)

Callers 1

snvs_detachFunction · 0.85

Calls 3

taskqueue_cancel_timeoutFunction · 0.85
taskqueue_drain_timeoutFunction · 0.85
freeFunction · 0.70

Tested by

no test coverage detected