Domain: Split off invokeDomainSetSet
Retain the ridiculous name to make clear which invocation is being handled. Rename tptr to tcb for consistency within the file. We have a dom_t type, use it as early as possible. Signed-off-by: Indan Zupancic <indan@nul.nu>
This commit is contained in:
parent
35ec2554b9
commit
8f8776a541
2 changed files with 9 additions and 4 deletions
|
|
@ -263,6 +263,7 @@ exception_t invokeTCB_ReadRegisters(tcb_t *src, bool_t suspendSource,
|
|||
exception_t invokeTCB_WriteRegisters(tcb_t *dest, bool_t resumeTarget,
|
||||
word_t n, word_t arch, word_t *buffer);
|
||||
exception_t invokeTCB_NotificationControl(tcb_t *tcb, notification_t *ntfnPtr);
|
||||
void invokeDomainSetSet(tcb_t *tcb, dom_t domain);
|
||||
|
||||
cptr_t PURE getExtraCPtr(word_t *bufferPtr, word_t i);
|
||||
void setExtraBadge(word_t *bufferPtr, word_t badge, word_t i);
|
||||
|
|
|
|||
|
|
@ -1575,7 +1575,7 @@ exception_t decodeSetSpace(cap_t cap, word_t length, cte_t *slot, word_t *buffer
|
|||
|
||||
exception_t decodeDomainInvocation(word_t invLabel, word_t length, word_t *buffer)
|
||||
{
|
||||
word_t domain;
|
||||
dom_t domain;
|
||||
cap_t tcap;
|
||||
|
||||
if (unlikely(invLabel != DomainSetSet)) {
|
||||
|
|
@ -1611,13 +1611,17 @@ exception_t decodeDomainInvocation(word_t invLabel, word_t length, word_t *buffe
|
|||
current_syscall_error.invalidArgumentNumber = 1;
|
||||
return EXCEPTION_SYSCALL_ERROR;
|
||||
}
|
||||
|
||||
setThreadState(NODE_STATE(ksCurThread), ThreadState_Restart);
|
||||
prepareSetDomain(TCB_PTR(cap_thread_cap_get_capTCBPtr(tcap)), domain);
|
||||
setDomain(TCB_PTR(cap_thread_cap_get_capTCBPtr(tcap)), domain);
|
||||
invokeDomainSetSet(TCB_PTR(cap_thread_cap_get_capTCBPtr(tcap)), domain);
|
||||
return EXCEPTION_NONE;
|
||||
}
|
||||
|
||||
void invokeDomainSetSet(tcb_t *tcb, dom_t domain)
|
||||
{
|
||||
prepareSetDomain(tcb, domain);
|
||||
setDomain(tcb, domain);
|
||||
}
|
||||
|
||||
exception_t decodeBindNotification(cap_t cap)
|
||||
{
|
||||
notification_t *ntfnPtr;
|
||||
|
|
|
|||
Loading…
Reference in a new issue