only switch pagetable if necessary and it's different for copying messages
This commit is contained in:
parent
37cd6bc06c
commit
9d56ac3fc9
@ -704,11 +704,14 @@ u32_t read_cr3(void)
|
||||
phys_bytes arch_switch_copymsg(struct proc *rp, message *m, phys_bytes lin)
|
||||
{
|
||||
phys_bytes r;
|
||||
if(rp->p_seg.p_cr3) {
|
||||
int u = 0;
|
||||
if(!intr_disabled()) { lock; u = 1; }
|
||||
if(rp->p_seg.p_cr3 && ptproc != rp) {
|
||||
vm_set_cr3(rp->p_seg.p_cr3);
|
||||
ptproc = rp;
|
||||
}
|
||||
r = phys_copy(vir2phys(m), lin, sizeof(message));
|
||||
if(u) { unlock; }
|
||||
}
|
||||
|
||||
/*===========================================================================*
|
||||
|
Loading…
x
Reference in New Issue
Block a user