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

1990/0914/port/devproc.c (diff list | history)

1990/0614/sys/src/9/port/devproc.c:4,91990/0914/sys/src/9/port/devproc.c:4,10 (short | long | prev | next)
1990/0227    
#include	"dat.h" 
#include	"fns.h" 
#include	"errno.h" 
1990/0914    
#include 	"io.h" 
1990/0227    
 
#include	"devtab.h" 
 
1990/0614/sys/src/9/port/devproc.c:280,2851990/0914/sys/src/9/port/devproc.c:281,291
1990/0614    
		if(c->offset>=KZERO && c->offset<KZERO+conf.npage0*BY2PG){ 
			if(c->offset+n > KZERO+conf.npage0*BY2PG) 
				n = KZERO+conf.npage0*BY2PG - c->offset; 
1990/0914    
			memcpy(a, (char*)c->offset, n); 
			return n; 
		} else if(c->offset>=UNCACHED && c->offset<UNCACHED+conf.npage0*BY2PG){ 
			if(c->offset+n > UNCACHED+conf.npage0*BY2PG) 
				n = UNCACHED+conf.npage0*BY2PG - c->offset; 
1990/0227    
			memcpy(a, (char*)c->offset, n); 
			return n; 
		} 


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