File:  [XINU] / xinu / sys / LSI / dfalloc.c
Revision 1.1.1.1 (vendor branch): download - view: text, annotated - select for diffs
Tue Apr 24 17:39:04 2018 UTC (8 years, 3 months ago) by root
Branches: xinu, MAIN
CVS tags: xinu-19870308, HEAD
Xinu for VAX

/* dfalloc.c - dfalloc */

#include <conf.h>
#include <kernel.h>
#include <disk.h>
#include <lfile.h>

/*------------------------------------------------------------------------
 *  dfalloc  --  allocate a device table entry for a disk file; return id
 *------------------------------------------------------------------------
 */
#ifdef	Ndf
dfalloc()		/* assume exclusion for dir. provided by caller	*/
{
	int	i;

	for (i=0 ; i<Ndf ; i++)
		if (fltab[i].fl_pid == 0) {
			fltab[i].fl_pid = getpid();
			return(i);
		}
	return(SYSERR);
}
#endif

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.