--- xinu/sys/getbuf.c 2018/04/24 17:39:04 1.1 +++ xinu/sys/getbuf.c 2018/04/24 17:40:03 1.1.1.2 @@ -9,23 +9,26 @@ * getbuf -- get a buffer from a preestablished buffer pool *------------------------------------------------------------------------ */ -SYSCALL *getbuf(poolid) +char * +getbuf(poolid) int poolid; { - PStype ps; int *buf; +#ifdef DEBUG + dotrace("getbuf", &poolid, 1); +#endif #ifdef MEMMARK if ( unmarked(bpmark) ) - return((int *)SYSERR); + return(SYSERR); #endif if (poolid<0 || poolid>=nbpools) - return((int *)SYSERR); + return(SYSERR); wait(bptab[poolid].bpsem); - disable(ps); + disable(); buf = (int *)bptab[poolid].bpnext; - bptab[poolid].bpnext = (char *)*buf; - restore(ps); + bptab[poolid].bpnext = *buf; + restore(); *buf++ = poolid; - return(buf); + return( (char *)buf ); }