summaryrefslogtreecommitdiff
path: root/ndb/src/mgmsrv/MgmtSrvrGeneralSignalHandling.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'ndb/src/mgmsrv/MgmtSrvrGeneralSignalHandling.cpp')
-rw-r--r--ndb/src/mgmsrv/MgmtSrvrGeneralSignalHandling.cpp120
1 files changed, 0 insertions, 120 deletions
diff --git a/ndb/src/mgmsrv/MgmtSrvrGeneralSignalHandling.cpp b/ndb/src/mgmsrv/MgmtSrvrGeneralSignalHandling.cpp
index f93948abc75..c99936e1861 100644
--- a/ndb/src/mgmsrv/MgmtSrvrGeneralSignalHandling.cpp
+++ b/ndb/src/mgmsrv/MgmtSrvrGeneralSignalHandling.cpp
@@ -20,123 +20,3 @@
// Some kind of reuse should be preferred.
//******************************************************************************
-#include "MgmtSrvr.hpp"
-#include <NdbApiSignal.hpp>
-#include <NdbTick.h>
-
-
-NdbApiSignal*
-MgmtSrvr::getSignal()
-{
- NdbApiSignal* tSignal;
- tSignal = theSignalIdleList;
- if (tSignal != NULL){
- NdbApiSignal* tSignalNext = tSignal->next();
- tSignal->next(NULL);
- theSignalIdleList = tSignalNext;
- return tSignal;
- } else
- {
- tSignal = new NdbApiSignal(_ownReference);
- if (tSignal != NULL)
- tSignal->next(NULL);
- }
- return tSignal;
-}
-
-
-void
-MgmtSrvr::releaseSignal(NdbApiSignal* aSignal)
-{
- aSignal->next(theSignalIdleList);
- theSignalIdleList = aSignal;
-}
-
-
-void
-MgmtSrvr::freeSignal()
-{
- NdbApiSignal* tSignal = theSignalIdleList;
- theSignalIdleList = tSignal->next();
- delete tSignal;
-}
-
-
-int
-MgmtSrvr::sendSignal(Uint16 aNodeId,
- WaitSignalType aWaitState,
- NdbApiSignal* aSignal,
- bool force)
-{
- int tReturnCode;
- theFacade->lock_mutex();
- if(force){
- tReturnCode = theFacade->sendSignalUnCond(aSignal,
- aNodeId);
- } else {
- tReturnCode = theFacade->sendSignal(aSignal,
- aNodeId);
- }
- releaseSignal(aSignal);
- if (tReturnCode == -1) {
- theFacade->unlock_mutex();
- return -1;
- }
- theWaitState = aWaitState;
- theFacade->unlock_mutex();
- return 0;
-}
-
-
-int
-MgmtSrvr::sendRecSignal(Uint16 aNodeId,
- WaitSignalType aWaitState,
- NdbApiSignal* aSignal,
- bool force,
- int waitTime)
-{
- int tReturnCode;
- theFacade->lock_mutex();
- if(force){
- tReturnCode = theFacade->sendSignalUnCond(aSignal, aNodeId);
- } else {
- tReturnCode = theFacade->sendSignalUnCond(aSignal, aNodeId);
- }
- releaseSignal(aSignal);
- if (tReturnCode == -1) {
- theFacade->unlock_mutex();
- return -1;
- }
- theWaitState = aWaitState;
- theWaitNode = aNodeId;
- return receiveOptimisedResponse(waitTime);
-}
-
-
-int
-MgmtSrvr::receiveOptimisedResponse(int waitTime)
-{
- int tResultCode;
- theFacade->checkForceSend(_blockNumber);
- NDB_TICKS maxTime = NdbTick_CurrentMillisecond() + waitTime;
-
- while (theWaitState != NO_WAIT && theWaitState != WAIT_NODEFAILURE
- && waitTime > 0) {
- NdbCondition_WaitTimeout(theMgmtWaitForResponseCondPtr,
- theFacade->theMutexPtr,
- waitTime);
- if(theWaitState == NO_WAIT || theWaitState == WAIT_NODEFAILURE)
- break;
- waitTime = (maxTime - NdbTick_CurrentMillisecond());
- }//while
-
- if(theWaitState == NO_WAIT) {
- tResultCode = 0;
- } else {
- tResultCode = -1;
- }
- theFacade->unlock_mutex();
- return tResultCode;
-}
-
-