Skip to content

Commit bce8b4e

Browse files
committed
Lock the CRORC DMA per channel and not per endpoint
1 parent 8044c78 commit bce8b4e

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/DmaChannelBase.cxx

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,12 @@ DmaChannelBase::DmaChannelBase(CardDescriptor cardDescriptor, Parameters& parame
108108
//try to acquire lock
109109
log("Acquiring DMA channel lock", InfoLogger::InfoLogger::Debug);
110110
try{
111-
Utilities::resetSmartPtr(mInterprocessLock, "Alice_O2_RoC_DMA_" + cardDescriptor.pciAddress.toString() +"_lock");
111+
if (mCardDescriptor.cardType == CardType::Crorc) {
112+
Utilities::resetSmartPtr(mInterprocessLock, "Alice_O2_RoC_DMA_" + cardDescriptor.pciAddress.toString() + "_chan" +
113+
std::to_string(mChannelNumber) + "_lock");
114+
} else {
115+
Utilities::resetSmartPtr(mInterprocessLock, "Alice_O2_RoC_DMA_" + cardDescriptor.pciAddress.toString() + "_lock");
116+
}
112117
}
113118
catch (const LockException& exception) {
114119
log("Failed to acquire DMA channel lock", InfoLogger::InfoLogger::Debug);

0 commit comments

Comments
 (0)