plan 9 kernel history: overview | file list | diff list

1991/0606/port/devscc.c (diff list | history)

1991/0604/sys/src/9/port/devscc.c:101,1071991/0606/sys/src/9/port/devscc.c:101,107 (short | long | prev | next)
1991/0601    
	Alarm	*a;		/* alarm for waking the kernel process */ 
	int	delay;		/* between character input and waking kproc */ 
 	int	kstarted;	/* kproc started */ 
	uchar	delim[256];	/* characters that act as delimiters */ 
1991/0606    
	uchar	delim[256/8];	/* characters that act as delimiters */ 
1991/0601    
}; 
SCC	scc[2]; 
 
1991/0604/sys/src/9/port/devscc.c:296,3021991/0606/sys/src/9/port/devscc.c:296,302
1991/0601    
				(*cq->putc)(cq, ch); 
			else { 
				putc(cq, ch); 
				if(sp->delim[ch]) 
1991/0606    
				if(sp->delim[ch/8] & (1<<(ch&7)) ) 
1991/0601    
					wakeup(&cq->r); 
			} 
		} 
1991/0604/sys/src/9/port/devscc.c:331,3371991/0606/sys/src/9/port/devscc.c:331,337
1991/0601    
 *  turn on a port's interrupts.  set DTR and RTS 
 */ 
void 
sccdevice(SCC *sp) 
1991/0606    
sccenable(SCC *sp) 
1991/0601    
{ 
	/* 
	 *  set up i/o routines 
1991/0604/sys/src/9/port/devscc.c:371,3771991/0606/sys/src/9/port/devscc.c:371,377
1991/0601    
	sp->nostream = 1; 
	sp->oq = oq; 
	sp->iq = iq; 
	sccdevice(sp); 
1991/0606    
	sccenable(sp); 
1991/0601    
	sccsetbaud(sp, baud); 
} 
 
1991/0604/sys/src/9/port/devscc.c:580,5861991/0606/sys/src/9/port/devscc.c:580,586
1991/0601    
		initq(sp->iq); 
		sp->oq = ialloc(sizeof(IOQ), 0); 
		initq(sp->oq); 
		sccdevice(sp); 
1991/0606    
		sccenable(sp); 
1991/0601    
	} 
} 
 


source code copyright © 1990-2005 Lucent Technologies; see license
Plan 9 distribution
comments to russ cox (rsc@swtch.com)