File:  [XINU] / xinu / sys / rfalloc.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

/* rfalloc.c - rfalloc */

#include <conf.h>
#include <kernel.h>
#include <fserver.h>
#include <rfile.h>

/*------------------------------------------------------------------------
 *  rfalloc  --  allocate pseudo device for a remote file; return id
 *------------------------------------------------------------------------
 */
rfalloc()
{
	int	i;
	PStype	ps;

	disable(ps);
	for (i=0 ; i<Nrf ; i++)
		if (Rf.rftab[i].rf_state == RFREE) {
			Rf.rftab[i].rf_state = RUSED;
			restore(ps);
			return(i);
		}
	restore(ps);
	return(SYSERR);
}

unix.superglobalmegacorp.com

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