mirror of
https://github.com/par274/sharpemu.git
synced 2026-08-01 15:39:47 +08:00
Add SaveData transaction and NP UDS layout HLE stubs (#168)
* Add SaveData transaction and NP UDS layout HLE stubs Wire Prepare, Commit, and Umount2 for implicit save transactions, unregister guest mounts on Umount2, and add NP UDS CreateEvent, DestroyEvent, and EventPropertyObjectSetString for layout-load imports. * Add NP UDS SetArray and PostEvent layout HLE stubs Add sceNpUniversalDataSystemEventPropertyObjectSetArray and sceNpUniversalDataSystemPostEvent for layout-load imports on PPSA02929.
This commit is contained in:
@@ -200,6 +200,40 @@ public static class KernelMemoryCompatExports
|
||||
}
|
||||
}
|
||||
|
||||
public static bool TryUnregisterGuestPathMount(string guestMountPoint)
|
||||
{
|
||||
if (string.IsNullOrWhiteSpace(guestMountPoint))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
var normalizedMountPoint = NormalizeGuestStatCachePath(guestMountPoint);
|
||||
if (normalizedMountPoint is null || normalizedMountPoint == "/")
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
var removed = false;
|
||||
lock (_guestMountGate)
|
||||
{
|
||||
removed = _guestMounts.Remove(normalizedMountPoint);
|
||||
}
|
||||
|
||||
if (!removed)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
lock (_statCacheGate)
|
||||
{
|
||||
_negativeStatCache.RemoveWhere(path =>
|
||||
string.Equals(path, normalizedMountPoint, StringComparison.OrdinalIgnoreCase) ||
|
||||
path.StartsWith(normalizedMountPoint + "/", StringComparison.OrdinalIgnoreCase));
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
internal static bool TryAllocateHleData(
|
||||
CpuContext ctx,
|
||||
ulong length,
|
||||
|
||||
Reference in New Issue
Block a user