Add timeout in NS_TerminateProcessTID() (#389)
This commit is contained in:
parent
c598c445cd
commit
2158f71eb2
@ -41,5 +41,6 @@ Result NS_RebootToTitle(u8 mediatype, u64 titleid);
|
|||||||
/**
|
/**
|
||||||
* @brief Terminates the process with the specified titleid.
|
* @brief Terminates the process with the specified titleid.
|
||||||
* @param titleid ID of the title to terminate.
|
* @param titleid ID of the title to terminate.
|
||||||
|
* @param timeout Timeout in nanoseconds. Pass 0 if not required.
|
||||||
*/
|
*/
|
||||||
Result NS_TerminateProcessTID(u64 titleid);
|
Result NS_TerminateProcessTID(u64 titleid, u64 timeout);
|
@ -89,7 +89,7 @@ Result NS_RebootToTitle(u8 mediatype, u64 titleid)
|
|||||||
return (Result)cmdbuf[1];
|
return (Result)cmdbuf[1];
|
||||||
}
|
}
|
||||||
|
|
||||||
Result NS_TerminateProcessTID(u64 titleid)
|
Result NS_TerminateProcessTID(u64 titleid, u64 timeout)
|
||||||
{
|
{
|
||||||
Result ret = 0;
|
Result ret = 0;
|
||||||
u32 *cmdbuf = getThreadCommandBuffer();
|
u32 *cmdbuf = getThreadCommandBuffer();
|
||||||
@ -97,8 +97,8 @@ Result NS_TerminateProcessTID(u64 titleid)
|
|||||||
cmdbuf[0] = IPC_MakeHeader(0x11,4,0); // 0x110100
|
cmdbuf[0] = IPC_MakeHeader(0x11,4,0); // 0x110100
|
||||||
cmdbuf[1] = titleid & 0xffffffff;
|
cmdbuf[1] = titleid & 0xffffffff;
|
||||||
cmdbuf[2] = (titleid >> 32) & 0xffffffff;
|
cmdbuf[2] = (titleid >> 32) & 0xffffffff;
|
||||||
cmdbuf[3] = 0x0;
|
cmdbuf[3] = timeout & 0xffffffff;
|
||||||
cmdbuf[4] = 0x0;
|
cmdbuf[4] = (timeout >> 32) & 0xffffffff;
|
||||||
|
|
||||||
if(R_FAILED(ret = svcSendSyncRequest(nsHandle)))return ret;
|
if(R_FAILED(ret = svcSendSyncRequest(nsHandle)))return ret;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user