scanOnce: Protect rngBufPut with intLock

This commit is contained in:
Marty Kraimer
1997-06-30 13:35:21 +00:00
parent 9ae05dc580
commit cd20d8d662

View File

@@ -440,8 +440,13 @@ void scanIoRequest(IOSCANPVT pioscanpvt)
void scanOnce(void *precord)
{
static int newOverflow=TRUE;
int lockKey;
int nput;
if(rngBufPut(onceQ,(void *)&precord,sizeof(precord))!=sizeof(precord)) {
lockKey = intLock();
nput = rngBufPut(onceQ,(void *)&precord,sizeof(precord));
intUnlock(lockKey);
if(nput!=sizeof(precord)) {
if(newOverflow)errMessage(0,"rngBufPut overflow in scanOnce");
newOverflow = FALSE;
}else {