void cfw_process(T_QUEUE queue) { struct cfw_message * message; T_QUEUE_MESSAGE m; queue_get_message(queue, &m, OS_WAIT_FOREVER, NULL); message = (struct cfw_message *) m; if ( message != NULL ) { pr_info(LOG_MODULE_MAIN, "Got message: %p", message); port_process_message(&message->m); } }
void _cfw_loop(void * queue) { struct cfw_message * message; T_QUEUE_MESSAGE m; while (1) { /* This infinite loop is intentional and requested by design */ queue_get_message(queue, &m, OS_WAIT_FOREVER, NULL ); message = (struct cfw_message *) m; if (message != NULL ) { port_process_message(&message->m); } } }