Lines Matching refs:thread

49     OSThread            thread[1];  member
72 WFSServerThread * const thread = (WFSServerThread*)userdata; in WFSi_ReadRomCallback() local
108 (void)FS_SeekFile(thread->file, (int)offset, FS_SEEK_SET); in WFSi_ReadRomCallback()
109 (void)FS_ReadFile(thread->file, buffer, (int)length); in WFSi_ReadRomCallback()
147 WFSServerThread *const thread = (WFSServerThread*)arg; in WFSi_ServerThreadProc() local
151 (void)OS_ReceiveMessage(thread->msg_queue, (OSMessage*)&busy, OS_MESSAGE_BLOCK); in WFSi_ServerThreadProc()
156 MI_LoadCache(thread->cache, thread->device); in WFSi_ServerThreadProc()
173 WFSServerThread * const thread = (WFSServerThread *)work; in WFSi_ThreadHook() local
178 (void)OS_SendMessage(thread->msg_queue, (OSMessage)FALSE, OS_MESSAGE_BLOCK); in WFSi_ThreadHook()
179 OS_JoinThread(thread->thread); in WFSi_ThreadHook()
180 (void)FS_CloseFile(thread->file); in WFSi_ThreadHook()
183 else if (!MI_ReadCache(thread->cache, segment->buffer, segment->offset, segment->length)) in WFSi_ThreadHook()
188 (void)OS_SendMessage(thread->msg_queue, (OSMessage)TRUE, OS_MESSAGE_NOBLOCK); in WFSi_ThreadHook()
216 WFSServerThread *thread = MI_CallAlloc(context->allocator, sizeof(WFSServerThread), 32); in WFS_ExecuteRomServerThread() local
217 if (!thread) in WFS_ExecuteRomServerThread()
228 FS_InitFile(thread->file); in WFS_ExecuteRomServerThread()
229 if (!FS_CreateFileFromRom(thread->file, 0, 0x7FFFFFFF)) in WFS_ExecuteRomServerThread()
233 MI_InitDevice(thread->device, thread, in WFS_ExecuteRomServerThread()
235 MI_InitCache(thread->cache, WFS_FILE_CACHE_SIZE, in WFS_ExecuteRomServerThread()
236 thread->cache_buf, sizeof(thread->cache_buf)); in WFS_ExecuteRomServerThread()
238 if (WFS_RegisterServerTable(context, thread->device, fatbase, overlay)) in WFS_ExecuteRomServerThread()
241 context->thread_work = thread; in WFS_ExecuteRomServerThread()
243 OS_InitMessageQueue(thread->msg_queue, thread->msg_array, 1); in WFS_ExecuteRomServerThread()
244 OS_CreateThread(thread->thread, WFSi_ServerThreadProc, thread, in WFS_ExecuteRomServerThread()
245 thread->thread_stack + sizeof(thread->thread_stack), in WFS_ExecuteRomServerThread()
246 sizeof(thread->thread_stack), 15); in WFS_ExecuteRomServerThread()
247 OS_WakeupThreadDirect(thread->thread); in WFS_ExecuteRomServerThread()
252 MI_CallFree(context->allocator, thread); in WFS_ExecuteRomServerThread()