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

1991/0304/power/devhotrod.c (diff list | history)

1991/0303/sys/src/9/power/devhotrod.c:15,211991/0304/sys/src/9/power/devhotrod.c:15,21 (short | long | prev | next)
1991/0303    
/* 
 * If set, causes data transfers to have checksums 
 */ 
#define	ENABCKSUM	1 
1991/0304    
#define	ENABCKSUM	0 
1991/0303    
 
1990/1013    
typedef struct Hotrod	Hotrod; 
1991/0209    
typedef struct HotQ	HotQ; 
1991/0303/sys/src/9/power/devhotrod.c:70,841991/0304/sys/src/9/power/devhotrod.c:70,92
1991/0209    
void 
hotsend(Hotrod *h, Hotmsg *m) 
1990/1013    
{ 
1991/0304    
	Hotmsg **mp; 
	long l; 
 
1991/0220    
/* print("hotsend send %d %d %lux %lux\n", h->wi, m->cmd, m, m->param[0]); /**/ 
1991/0212    
	h->wq->msg[h->wi] = (Hotmsg*)MP2VME(m); 
1991/0215    
	do 
		delay(1); 
	while(h->wq->msg[h->wi]); 
1991/0220    
/* print("hotsend done\n"); /**/ 
1991/0304    
	mp = &h->wq->msg[h->wi]; 
	*mp = (Hotmsg*)MP2VME(m); 
1991/0209    
	h->wi++; 
	if(h->wi >= NhotQ) 
		h->wi = 0; 
1991/0304    
	l = 0; 
	while(*mp){ 
		delay(0);	/* just a subroutine call; stay off VME */ 
		if(++l > 1000*1000){ 
			l = 0; 
			print("hotsend blocked\n"); 
		} 
	} 
1990/1013    
} 
 
/* 
1991/0303/sys/src/9/power/devhotrod.c:360,3661991/0304/sys/src/9/power/devhotrod.c:368,374
1991/0212    
			qunlock(hp); 
		}else{ 
			/* 
			 *  use hotrod buffer.  lock the buffer till the reply 
1991/0304    
			 *  use hotrod buffer.  lock the buffer until the reply 
1991/0212    
			 */ 
			mp = &u->uhot; 
			qlock(&hp->buflock); 


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