diamond version of port locking because of probplems with tpmac driver

This commit is contained in:
zimoch
2010-10-27 11:38:25 +00:00
parent 494661c0e7
commit 8252b629f5

View File

@ -531,9 +531,15 @@ void AsynDriverInterface::
lockHandler()
{
int connected;
asynStatus status;
debug("AsynDriverInterface::lockHandler(%s)\n",
clientName());
pasynManager->blockProcessCallback(pasynUser, false);
status = pasynManager->lockPort(pasynUser);
if(status!=asynSuccess) {
debug("Failed locking port");
}
connected = connectToAsynPort();
lockCallback(connected ? StreamIoSuccess : StreamIoFault);
}
@ -542,8 +548,13 @@ lockHandler()
bool AsynDriverInterface::
unlock()
{
asynStatus unlockStatus;
debug("AsynDriverInterface::unlock(%s)\n",
clientName());
unlockStatus = pasynManager->unlockPort(pasynUser);
if (unlockStatus != asynSuccess) {
debug("Failed unlocking port");
}
pasynManager->unblockProcessCallback(pasynUser, false);
return true;
}