STATUS: 99%

0000 T _signal		compatible
    0052 T _psignal		compatible
    00b6 T _issig		compatible
    0186 T _stop		compatible
    0216 T _psig		compatible
    02d4 T _fsig		compatible
    031e T _core		compatible
    0512 T _grow		compatible
    0640 T _ptrace		not compatible
    				ip_addr assignment is not correct.
    075c T _procxmt		compatible
This commit is contained in:
Oliver Lehmann 2008-06-06 15:08:09 +00:00
parent 7ee3be2a08
commit 6816b35569
1 changed files with 20 additions and 44 deletions

View File

@ -279,7 +279,7 @@ core()
} else } else
u.u_error = EACCES; u.u_error = EACCES;
iput(ip); iput(ip);
return(u.u_error==0); /* FIXME: this is not compatible extsb r2 is missing here... */ return((char)(u.u_error==0));
} }
/* /*
@ -288,7 +288,7 @@ core()
*/ */
grow(sp) grow(sp)
int sp; unsigned sp;
{ {
register j, si, i; register j, si, i;
register struct proc *p; register struct proc *p;
@ -297,8 +297,9 @@ int sp;
if(sp >= ctob(256-(u.u_ssize-1))) if(sp >= ctob(256-(u.u_ssize-1)))
return(0); return(0);
for(j=6;;) { j=6;
if(!j--) while(1) {
if(!(j = j - 1))
return(0); return(0);
si=(256-btoc(sp))-u.u_ssize+j; si=(256-btoc(sp))-u.u_ssize+j;
if(si<=0) if(si<=0)
@ -306,41 +307,14 @@ int sp;
if(!u.u_segmented){ if(!u.u_segmented){
if((u.u_ssize + USIZE + si + u.u_dsize) >= 0x100) if((u.u_ssize + USIZE + si + u.u_dsize) >= 0x100)
continue; continue;
/* if(!estabur(u.u_tsize,u.u_dsize,u.u_ssize+si,1)) if(estabur(u.u_tsize,u.u_dsize,u.u_ssize+si,1))
break; continue;
*/ estabur(u.u_tsize,u.u_dsize,u.u_ssize+si,1);
} else { } else {
if(u.u_ssize + si > 0x100) if(u.u_ssize + si > 0x100)
continue; continue;
u.u_segmts[NUSEGS-1].sg_limit = 256 - (u.u_ssize+si); u.u_segmts[NUSEGS-1].sg_limit = 256 - (u.u_ssize+si);
break;
} }
}
/* correct code based on the asm listing but gets ordered differently
because of the optimizer
j=6;
goto count;
not_seg:
if((u.u_ssize + USIZE + si + u.u_dsize) >= 0x100)
goto count;
if(estabur(u.u_tsize,u.u_dsize,u.u_ssize+si,1))
goto out;
count:
if(!j--)
return(0);
si=(256-btoc(sp))-u.u_ssize+j;
if(si<=0)
goto count;
if(!u.u_segmented)
goto not_seg;
if(u.u_ssize + si > 0x100)
continue;
u.u_segmts[NUSEGS-1].sg_limit = 256 - (u.u_ssize+si);
*/
out:
p = u.u_procp; p = u.u_procp;
expand(p->p_size+si); expand(p->p_size+si);
a=p->p_addr+p->p_size; a=p->p_addr+p->p_size;
@ -353,6 +327,8 @@ out:
u.u_ssize += si; u.u_ssize += si;
return(1); return(1);
} }
}
/* /*
* sys-trace system call. * sys-trace system call.
*/ */