Beispiel #1
0
signed long ioman_findFreeSpot(IOManager *ioman)
{
	unsigned short c;
	
	for(c=0;c<ioman->numbuf;c++){
		if(!ioman_isValid(c))return(c);
	}
	return(-1);
}
Beispiel #2
0
esint32 ioman_findFreeSpot(IOManager *ioman)
{
	euint16 c;
	
	for(c=0;c<ioman->numbuf;c++){
		if(!ioman_isValid(c))return(c);
	}
	return(-1);
}
Beispiel #3
0
signed long ioman_findSectorInCache(IOManager *ioman, unsigned long address)
{
	unsigned short c;
	
	for(c=0;c<ioman->numbuf;c++){
		if(ioman_isValid(c) && ioman->sector[c] == address)return(c);
	}
	return(-1);
}
Beispiel #4
0
esint32 ioman_findSectorInCache(IOManager *ioman, euint32 address)
{
	euint16 c;
	
	for(c=0;c<ioman->numbuf;c++){
		if(ioman_isValid(c) && ioman->sector[c] == address)return(c);
	}
	return(-1);
}
Beispiel #5
0
void ioman_printStatus(IOManager *ioman)
{
	unsigned short c;
	
	DBG((TXT("IO-Manager -- Report\n====================\n")));
	DBG((TXT("Buffer is %i sectors, from %p to %p\n"),
	          ioman->numbuf,ioman->bufptr,ioman->bufptr+(ioman->numbuf*512)));
	for(c=0;c<ioman->numbuf;c++){
		if(ioman_isValid(c)){
			DBG((TXT("BP %3i\t SC %8li\t\t US %i\t RF %i\t %s %s\n"),
				c,ioman->sector[c],ioman_getUseCnt(ioman,c),ioman_getRefCnt(ioman,c),
				ioman_isUserBuf(c) ? "USRBUF" : "      ",
				ioman_isWritable(c) ? "WRITABLE" : "READONLY"));
		}
	}
}