void __KernelMutexInit() { mutexWaitTimer = CoreTiming::RegisterEvent("MutexTimeout", __KernelMutexTimeout); lwMutexWaitTimer = CoreTiming::RegisterEvent("LwMutexTimeout", __KernelLwMutexTimeout); __KernelListenThreadEnd(&__KernelMutexThreadEnd); __KernelRegisterWaitTypeFuncs(WAITTYPE_MUTEX, __KernelMutexBeginCallback, __KernelMutexEndCallback); __KernelRegisterWaitTypeFuncs(WAITTYPE_LWMUTEX, __KernelLwMutexBeginCallback, __KernelLwMutexEndCallback); }
void __KernelMutexInit() { mutexWaitTimer = CoreTiming::RegisterEvent("MutexTimeout", &__KernelMutexTimeout); lwMutexWaitTimer = CoreTiming::RegisterEvent("LwMutexTimeout", &__KernelLwMutexTimeout); // TODO: Install on first mutex (if it's slow?) __KernelListenThreadEnd(&__KernelMutexThreadEnd); mutexInitComplete = true; }
void __IoInit() { INFO_LOG(HLE, "Starting up I/O..."); MemoryStick_SetFatState(PSP_FAT_MEMORYSTICK_STATE_ASSIGNED); #ifdef _WIN32 char path_buffer[_MAX_PATH], drive[_MAX_DRIVE] ,dir[_MAX_DIR], file[_MAX_FNAME], ext[_MAX_EXT]; char memstickpath[_MAX_PATH]; char flashpath[_MAX_PATH]; GetModuleFileName(NULL,path_buffer,sizeof(path_buffer)); char *winpos = strstr(path_buffer, "Windows"); if (winpos) *winpos = 0; strcat(path_buffer, "dummy.txt"); _splitpath_s(path_buffer, drive, dir, file, ext ); // Mount a couple of filesystems sprintf(memstickpath, "%s%sMemStick\\", drive, dir); sprintf(flashpath, "%s%sFlash\\", drive, dir); #else // TODO std::string memstickpath = g_Config.memCardDirectory; std::string flashpath = g_Config.flashDirectory; #endif DirectoryFileSystem *memstick; DirectoryFileSystem *flash; memstick = new DirectoryFileSystem(&pspFileSystem, memstickpath); flash = new DirectoryFileSystem(&pspFileSystem, flashpath); pspFileSystem.Mount("ms0:", memstick); pspFileSystem.Mount("fatms0:", memstick); pspFileSystem.Mount("fatms:", memstick); pspFileSystem.Mount("flash0:", flash); pspFileSystem.Mount("flash1:", flash); __KernelListenThreadEnd(&TellFsThreadEnded); }