*/
assert(!RTS_ISSET(caller, RTS_VMREQUEST));
assert(!RTS_ISSET(target, RTS_VMREQUEST));
+ assert(!(caller->p_misc_flags & MF_KCALL_RESUME));
+ assert(!(target->p_misc_flags & MF_KCALL_RESUME));
RTS_SET(caller, RTS_VMREQUEST);
if(vm_running) {
int r;
- if(caller && RTS_ISSET(caller, RTS_VMREQUEST)) {
+ if(caller && (caller->p_misc_flags & MF_KCALL_RESUME)) {
assert(caller->p_vmrequest.vmresult != VMSUSPEND);
- RTS_UNSET(caller, RTS_VMREQUEST);
if(caller->p_vmrequest.vmresult != OK) {
return caller->p_vmrequest.vmresult;
}
caller->p_rts_flags, caller->p_misc_flags);
*/
+ /* re-execute the kernel call, with MF_KCALL_RESUME still set so
+ * the call knows this is a retry.
+ */
+ result = kernel_call_dispatch(caller, &caller->p_vmrequest.saved.reqmsg);
/*
* we are resuming the kernel call so we have to remove this flag so it
* can be set again
*/
caller->p_misc_flags &= ~MF_KCALL_RESUME;
- result = kernel_call_dispatch(caller, &caller->p_vmrequest.saved.reqmsg);
kernel_call_finish(caller, &caller->p_vmrequest.saved.reqmsg, result);
}