kernel/os: Ensure callout initialized upon reset
It is an error to reset a callout prior to initializing it, as it has no
event queue to post to on expiry.
Now, `os_callout_reset()` asserts that the provided callout has been
initailized.
@@ -71,6 +71,9 @@ os_callout_reset(struct os_callout *c, os_time_t ticks)
os_sr_t sr;
int ret;
+ /* Ensure this callout has been initialized. */
+ assert(c->c_evq != NULL);
+
os_trace_api_u32x2(OS_TRACE_ID_CALLOUT_RESET, (uint32_t)c, (uint32_t)ticks);
if (ticks > INT32_MAX) {
