示例#1
0
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;
		}
	}
}
示例#2
0
文件: pthread.c 项目: bishisht/manrix
/*
 * pthread_self - get the calling thread ID
 */
pthread_t pthread_self(void)
{
	return syscall_get_tid();
}