|
|
1.1 ! root 1: /* dfalloc.c - dfalloc */ ! 2: ! 3: #include <conf.h> ! 4: #include <kernel.h> ! 5: #include <disk.h> ! 6: #include <lfile.h> ! 7: ! 8: /*------------------------------------------------------------------------ ! 9: * dfalloc -- allocate a device table entry for a disk file; return id ! 10: *------------------------------------------------------------------------ ! 11: */ ! 12: #ifdef Ndf ! 13: dfalloc() /* assume exclusion for dir. provided by caller */ ! 14: { ! 15: int i; ! 16: ! 17: for (i=0 ; i<Ndf ; i++) ! 18: if (fltab[i].fl_pid == 0) { ! 19: fltab[i].fl_pid = getpid(); ! 20: return(i); ! 21: } ! 22: return(SYSERR); ! 23: } ! 24: #endif
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.