|
|
1.1 ! root 1: /* poolinit.c - poolinit */ ! 2: ! 3: #include <conf.h> ! 4: #include <kernel.h> ! 5: #include <mark.h> ! 6: #include <bufpool.h> ! 7: ! 8: struct bpool bptab[NBPOOLS]; ! 9: int nbpools; ! 10: #ifdef MEMMARK ! 11: MARKER bpmark; /* self initializing mark */ ! 12: #endif ! 13: ! 14: /*------------------------------------------------------------------------ ! 15: * poolinit -- initialize the buffer pool routines ! 16: *------------------------------------------------------------------------ ! 17: */ ! 18: poolinit() ! 19: { ! 20: #ifdef MEMMARK ! 21: int status; ! 22: PStype ps; ! 23: ! 24: disable(ps); ! 25: if ( (status=mark(bpmark)) == OK) { ! 26: nbpools = 0; ! 27: } ! 28: restore(ps); ! 29: return( (status==OK) ? OK : SYSERR ); ! 30: #else ! 31: nbpools = 0; ! 32: return(OK); ! 33: #endif ! 34: }
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.