mirror of
https://github.com/LumaTeam/Luma3DS.git
synced 2026-02-22 01:44:38 +00:00
plugin_loader: Make plugin reply timeout configurable (#2183)
This commit is contained in:
parent
456a6b4ad7
commit
407c18e6fd
@ -56,10 +56,12 @@ typedef struct
|
|||||||
s32* plgldrEvent; ///< Used for synchronization
|
s32* plgldrEvent; ///< Used for synchronization
|
||||||
s32* plgldrReply; ///< Used for synchronization
|
s32* plgldrReply; ///< Used for synchronization
|
||||||
u8 notifyHomeEvent;
|
u8 notifyHomeEvent;
|
||||||
u8 padding[3];
|
u8 padding[7];
|
||||||
u32 reserved[23];
|
u64 waitForReplyTimeout;
|
||||||
|
u32 reserved[20];
|
||||||
u32 config[32];
|
u32 config[32];
|
||||||
} PluginHeader;
|
} PluginHeader;
|
||||||
|
_Static_assert(sizeof(PluginHeader) == 0x100, "Invalid PluginHeader size");
|
||||||
|
|
||||||
typedef void (*OnPlgLdrEventCb_t)(s32 eventType);
|
typedef void (*OnPlgLdrEventCb_t)(s32 eventType);
|
||||||
|
|
||||||
|
|||||||
@ -270,6 +270,7 @@ bool TryToLoadPlugin(Handle process, bool isHomebrew)
|
|||||||
}
|
}
|
||||||
|
|
||||||
pluginHeader->version = header->version;
|
pluginHeader->version = header->version;
|
||||||
|
pluginHeader->waitForReplyTimeout = 10000000000ULL;
|
||||||
// Code size must be page aligned
|
// Code size must be page aligned
|
||||||
exeHdr = &header->executable;
|
exeHdr = &header->executable;
|
||||||
pluginHeader->exeSize = (sizeof(PluginHeader) + exeHdr->codeSize + exeHdr->rodataSize + exeHdr->dataSize + exeHdr->bssSize + 0x1000) & ~0xFFF;
|
pluginHeader->exeSize = (sizeof(PluginHeader) + exeHdr->codeSize + exeHdr->rodataSize + exeHdr->dataSize + exeHdr->bssSize + 0x1000) & ~0xFFF;
|
||||||
|
|||||||
@ -516,7 +516,7 @@ void PLG__WaitForReply(void)
|
|||||||
{
|
{
|
||||||
if (PluginLoaderCtx.eventsSelfManaged) return;
|
if (PluginLoaderCtx.eventsSelfManaged) return;
|
||||||
__strex__(PluginLoaderCtx.plgReplyPA, PLG_WAIT);
|
__strex__(PluginLoaderCtx.plgReplyPA, PLG_WAIT);
|
||||||
svcArbitrateAddress(PluginLoaderCtx.arbiter, (u32)PluginLoaderCtx.plgReplyPA, ARBITRATION_WAIT_IF_LESS_THAN_TIMEOUT, PLG_OK, 10000000000ULL);
|
svcArbitrateAddress(PluginLoaderCtx.arbiter, (u32)PluginLoaderCtx.plgReplyPA, ARBITRATION_WAIT_IF_LESS_THAN_TIMEOUT, PLG_OK, MemoryBlock__GetMappedPluginHeader()->waitForReplyTimeout);
|
||||||
}
|
}
|
||||||
|
|
||||||
void PLG__SetConfigMemoryStatus(u32 status)
|
void PLG__SetConfigMemoryStatus(u32 status)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user