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

/* dlcputc.c - dlcputc */

#include <conf.h>
#include <kernel.h>
#include <slu11.h>
#include <proc.h>
#include <sleep.h>
#include <dlc.h>

/*------------------------------------------------------------------------
 *  dlcputc  --  write non-blockmode character (used for acks & resets)
 *------------------------------------------------------------------------
 */
dlcputc(devptr, ch)
struct	devsw	*devptr;
char	ch;
{
	char	ps;
	struct	dlblk	*dptr;
	struct	csr	*cptr;

	disable(ps);
	if ( (dptr = devptr->dvioblk)->dostate != DLOINIT) {
		restore(ps);
		return(SYSERR);
	}
	dptr->dochar = ch;
	dptr->dovalid = TRUE;
	(dptr->dioaddr)->ctstat = SLUENABLE;
	restore(ps);
	return(OK);
}

unix.superglobalmegacorp.com

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