File:  [XINU] / xinu / sys / foutput.c
Revision 1.1.1.1 (vendor branch): download - view: text, annotated - select for diffs
Tue Apr 24 17:39:53 2018 UTC (8 years, 2 months ago) by root
Branches: xinu, MAIN
CVS tags: xinu-19910600, HEAD
Xinu for 68000/68010

/* foutput.c - foutput */

#include <conf.h>
#include <kernel.h>
#include <frame.h>
#include <dlc.h>

/*------------------------------------------------------------------------
 *  foutput  --  select a frame from local or forward ports and send it
 *------------------------------------------------------------------------
 */
PROCESS	foutput(netid)
	int	netid;
{
	struct	frame	*fptr;
	struct	fglob	*fgptr;

	fgptr = &fdata[netid];
	control(fgptr->foutdev, DCSETREC, getpid());
	for (fgptr->fofails = fgptr->foseq = 0 ; TRUE ; ) {
		wait(fgptr->fosem);
		if (pcount(fgptr->ffport) > 0)
			fptr = (struct frame *)preceive(fgptr->ffport);
		else
			fptr = (struct frame *)preceive(fgptr->foport);
		_frsend(fptr, fgptr);
		freebuf(fptr);
	}
}

unix.superglobalmegacorp.com

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