From 8252b629f596b72222cc240f353d6f6fc568cd33 Mon Sep 17 00:00:00 2001 From: zimoch Date: Wed, 27 Oct 2010 11:38:25 +0000 Subject: [PATCH] diamond version of port locking because of probplems with tpmac driver --- src/AsynDriverInterface.cc | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/AsynDriverInterface.cc b/src/AsynDriverInterface.cc index 6d4a7db..4c68efb 100644 --- a/src/AsynDriverInterface.cc +++ b/src/AsynDriverInterface.cc @@ -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; }