u32_t addr;
proc_nr_t procslot;
- NOREC_ENTER(linlincopy);
-
assert(vm_running);
assert(nfreepdes >= 3);
/* If addr is nonzero, a page fault was caught. */
if(addr >= srcptr && addr < (srcptr + chunk)) {
- NOREC_RETURN(linlincopy, EFAULT_SRC);
+ return EFAULT_SRC;
}
if(addr >= dstptr && addr < (dstptr + chunk)) {
- NOREC_RETURN(linlincopy, EFAULT_DST);
+ return EFAULT_DST;
}
panic("lin_lin_copy fault out of range");
/* Not reached. */
- NOREC_RETURN(linlincopy, EFAULT);
+ return EFAULT;
}
/* Update counter and addresses for next iteration, if any. */
dstlinaddr += chunk;
}
- NOREC_RETURN(linlincopy, OK);
+ return OK;
}
u32_t *root, *pt;
int pde, pte;
u32_t pde_v, pte_v;
- NOREC_ENTER(vmlookup);
assert(proc);
assert(physical);
if(!HASPT(proc)) {
*physical = virtual;
- NOREC_RETURN(vmlookup, OK);
+ return OK;
}
/* Retrieve page directory entry. */
pde_v = phys_get32((u32_t) (root + pde));
if(!(pde_v & I386_VM_PRESENT)) {
- NOREC_RETURN(vmlookup, EFAULT);
+ return EFAULT;
}
/* We don't expect to ever see this. */
assert(pte >= 0 && pte < I386_VM_PT_ENTRIES);
pte_v = phys_get32((u32_t) (pt + pte));
if(!(pte_v & I386_VM_PRESENT)) {
- NOREC_RETURN(vmlookup, EFAULT);
+ return EFAULT;
}
if(ptent) *ptent = pte_v;
*physical += virtual % I386_PAGE_SIZE;
}
- NOREC_RETURN(vmlookup, OK);
+ return OK;
}
/*===========================================================================*
{
phys_bytes addr;
int r;
- NOREC_ENTER(deliver);
assert(rp->p_misc_flags & MF_DELIVERMSG);
assert(rp->p_delivermsg.m_source != NONE);
r = OK;
}
- NOREC_RETURN(deliver, r);
+ return r;
}
PRIVATE char *flagstr(u32_t e, const int dir)
int vm_phys_memset(phys_bytes ph, const u8_t c, phys_bytes bytes)
{
u32_t p;
- NOREC_ENTER(physmemset);
p = c | (c << 8) | (c << 16) | (c << 24);
if(!vm_running) {
phys_memset(ph, p, bytes);
- NOREC_RETURN(physmemset, OK);
+ return OK;
}
assert(nfreepdes >= 3);
}
- NOREC_RETURN(physmemset, OK);
+ return OK;
}
/*===========================================================================*
int seg_index;
int i;
struct proc *procs[2];
- NOREC_ENTER(virtualcopy);
assert((vmcheck && caller) || (!vmcheck && !caller));
case LOCAL_SEG:
case LOCAL_VM_SEG:
if(!p) {
- NOREC_RETURN(virtualcopy, EDEADSRCDST);
+ return EDEADSRCDST;
}
seg_index = vir_addr[i]->segment & SEGMENT_INDEX;
if(type == LOCAL_SEG)
break;
case REMOTE_SEG:
if(!p) {
- NOREC_RETURN(virtualcopy, EDEADSRCDST);
+ return EDEADSRCDST;
}
seg_index = vir_addr[i]->segment & SEGMENT_INDEX;
phys_addr[i] = umap_remote(p, seg_index, vir_addr[i]->offset, bytes);
break;
default:
printf("virtual_copy: strange type 0x%x\n", type);
- NOREC_RETURN(virtualcopy, EINVAL);
+ return EINVAL;
}
/* Check if mapping succeeded. */
if (phys_addr[i] <= 0 && vir_addr[i]->segment != PHYS_SEG) {
printf("virtual_copy EFAULT\n");
- NOREC_RETURN(virtualcopy, EFAULT);
+ return EFAULT;
}
}
assert(caller->p_vmrequest.vmresult != VMSUSPEND);
RTS_UNSET(caller, RTS_VMREQUEST);
if(caller->p_vmrequest.vmresult != OK) {
- NOREC_RETURN(virtualcopy, caller->p_vmrequest.vmresult);
+ return caller->p_vmrequest.vmresult;
}
}
if(r != EFAULT_SRC && r != EFAULT_DST)
panic("lin_lin_copy failed: %d", r);
if(!vmcheck || !caller) {
- NOREC_RETURN(virtualcopy, r);
+ return r;
}
assert(procs[_SRC_] && procs[_DST_]);
}
vm_suspend(caller, target, lin, bytes, VMSTYPE_KERNELCALL);
- NOREC_RETURN(virtualcopy, VMSUSPEND);
+ return VMSUSPEND;
}
- NOREC_RETURN(virtualcopy, OK);
+ return OK;
}
assert(!vm_running);
/* Now copy bytes between physical addresseses. */
if(phys_copy(phys_addr[_SRC_], phys_addr[_DST_], (phys_bytes) bytes))
- NOREC_RETURN(virtualcopy, EFAULT);
+ return EFAULT;
- NOREC_RETURN(virtualcopy, OK);
+ return OK;
}
/*===========================================================================*
/* This function is called an instant before proc_ptr is
* to be scheduled again.
*/
- NOREC_ENTER(schedch);
/*
* if the current process is still runnable check the misc flags and let
cycles_accounting_stop(proc_addr(KERNEL));
- NOREC_RETURN(schedch, proc_ptr);
+ return proc_ptr;
}
/*===========================================================================*
*/
int q = rp->p_priority; /* scheduling queue to use */
- NOREC_ENTER(enqueuefunc);
-
assert(proc_is_runnable(rp));
assert(q >= 0);
#if DEBUG_SANITYCHECKS
assert(runqueues_ok());
#endif
-
- NOREC_RETURN(enqueuefunc, );
}
/*===========================================================================*
register struct proc **xpp; /* iterate over queue */
register struct proc *prev_xp;
- NOREC_ENTER(dequeuefunc);
-
assert(proc_ptr_ok(rp));
assert(!proc_is_runnable(rp));
#if DEBUG_SANITYCHECKS
assert(runqueues_ok());
#endif
-
- NOREC_RETURN(dequeuefunc, );
}
/*===========================================================================*