swtch saves callee-saved registers

swtch idles on per-CPU stack, not on calling process's stack
fix pipe bugs
usertest.c tests pipes, fork, exit, close
This commit is contained in:
rtm 2006-07-01 21:26:01 +00:00
parent f7cea12b38
commit 8b4e2a08fe
14 changed files with 220 additions and 63 deletions

View file

@ -45,10 +45,15 @@ kfree(char *cp, int len)
struct run **rr;
struct run *p = (struct run *) cp;
struct run *pend = (struct run *) (cp + len);
int i;
if(len % PAGE)
panic("kfree");
// XXX fill with junk to help debug
for(i = 0; i < len; i++)
cp[i] = 1;
rr = &freelist;
while(*rr){
struct run *rend = (struct run *) ((char *)(*rr) + (*rr)->len);