assert(module != NULL);
assert(get_module_state(module) == MODULE_STATE_NONE);
+ LOG_WARN(LOG_TAG, "%s initializing the module \"%s\"", __func__, module->name);
if (!call_lifecycle_function(module->init)) {
LOG_ERROR(LOG_TAG, "%s failed to initialize \"%s\"", __func__, module->name);
return false;
}
+ LOG_WARN(LOG_TAG, "%s initialized the module \"%s\"", __func__, module->name);
set_module_state(module, MODULE_STATE_INITIALIZED);
return true;
// as we're converting the startup sequence.
assert(get_module_state(module) == MODULE_STATE_INITIALIZED || module->init == NULL);
+ LOG_WARN(LOG_TAG, "%s Starting the module \"%s\"", __func__, module->name);
if (!call_lifecycle_function(module->start_up)) {
LOG_ERROR(LOG_TAG, "%s failed to start up \"%s\"", __func__, module->name);
return false;
}
+ LOG_WARN(LOG_TAG, "%s Started the module \"%s\"", __func__, module->name);
set_module_state(module, MODULE_STATE_STARTED);
return true;
if (state < MODULE_STATE_STARTED)
return;
+ LOG_WARN(LOG_TAG, "%s Shutting the module \"%s\"", __func__, module->name);
if (!call_lifecycle_function(module->shut_down))
LOG_ERROR(LOG_TAG, "%s found \"%s\" reported failure during shutdown. Continuing anyway.", __func__, module->name);
+ else
+ LOG_WARN(LOG_TAG, "%s Shutdown the module \"%s\"", __func__, module->name);
set_module_state(module, MODULE_STATE_INITIALIZED);
}
}
thread->tid = gettid();
+ LOG_WARN(LOG_TAG, "%s: thread id %d, thread name %s started", __func__, thread->tid, thread->name);
+
semaphore_post(start->start_sem);
int fd = fixed_queue_get_dequeue_fd(thread->work_queue);
if (count > fixed_queue_capacity(thread->work_queue))
LOG_DEBUG(LOG_TAG, "%s growing event queue on shutdown.", __func__);
+ LOG_WARN(LOG_TAG, "%s: thread id %d, thread name %s exited", __func__, thread->tid, thread->name);
return NULL;
}