--- xinu/sys/mkpool.c 2018/04/24 17:39:04 1.1 +++ xinu/sys/mkpool.c 2018/04/24 17:39:45 1.1.1.2 @@ -9,24 +9,25 @@ * mkpool -- allocate memory for a buffer pool and link together *------------------------------------------------------------------------ */ -SYSCALL mkpool(bufsiz, numbufs) +mkpool(bufsiz, numbufs) int bufsiz, numbufs; { - PStype ps; int poolid; char *where; +#ifdef DEBUG + dotrace("mkpool", &bufsiz, 2); +#endif #ifdef MEMMARK if ( unmarked(bpmark) ) poolinit(); #endif - disable(ps); + disable(); if (bufsizBPMAXB || numbufs<1 || numbufs>BPMAXN || nbpools >= NBPOOLS - || (where=(char *)getmem((bufsiz+sizeof(int))*numbufs)) - == (char *)SYSERR) { - restore(ps); + || (where=getmem((bufsiz+sizeof(int))*numbufs)) == SYSERR) { + restore(); return(SYSERR); } poolid = nbpools++; @@ -37,6 +38,6 @@ int bufsiz, numbufs; for (numbufs-- ; numbufs>0 ; numbufs--,where+=bufsiz) *( (int *) where ) = (int)(where+bufsiz); *( (int *) where) = (int) NULL; - restore(ps); + restore(); return(poolid); }