15 const char *thread_name, uint32_t client_id) {
16 if (!thread || !func || !thread_name) {
17 return SET_ERRNO(ERROR_INVALID_PARAM,
"Invalid parameters for thread creation");
22 return SET_ERRNO(ERROR_PLATFORM_INIT,
"Failed to create %s thread for client %u (result=%d)", thread_name,
26 log_debug(
"Created %s thread for client %u successfully", thread_name, client_id);
asciichat_error_t thread_create_or_fail(asciichat_thread_t *thread, void *(*func)(void *), void *arg, const char *thread_name, uint32_t client_id)