void consumer_task (u_long a0, u_long a1, u_long a2, u_long a3) { u_long err, qid = a0, msg[4]; for (;;) { tm_wkafter(CONSUMER_WAIT); while ((err = q_receive(qid,Q_NOWAIT,0,msg)) == SUCCESS) xnprintf("Now playing %s...\n",(const char *)msg[0]); if (err != ERR_NOMSG) xnpod_fatal("q_receive() failed, errno %lu",err); } }
void os_sleep_ms(int ms) { tm_wkafter(MS2TICKS(ms)); }