void ServerCommand::command_thread_main_loop(void* arg) { Audio *parent = (Audio*)arg; MessageInfo msg; parent->tids[COMMAND_THREAD-1] = syscall_get_tid(); dprintf("COMMAND_THREAD = %x\n", syscall_get_tid()); while(1) { if( MonAPI::Message::receive(&msg) ) continue; switch(msg.header) { case MSG_AUDIO_SERVER_COMMAND: { if( msg.arg1 > NopCommand ) break; parent->commander->caller(msg.arg1, &msg); break; } default: break; } } }
/* * pthread_self - get the calling thread ID */ pthread_t pthread_self(void) { return syscall_get_tid(); }