Added LoadNotify functionality in TokenHandler.
authorTerry L. Wilmarth <wilmarth@uiuc.edu>
Wed, 6 Oct 1999 21:36:36 +0000 (21:36 +0000)
committerTerry L. Wilmarth <wilmarth@uiuc.edu>
Wed, 6 Oct 1999 21:36:36 +0000 (21:36 +0000)
src/conv-ldb/cldb.c
src/conv-ldb/cldb.h

index 5cc283f68be1d56cee5b7ff46bab078fb13fd2d7..a5d561ad43002e57cde255d0b7f0ce75e9ab5853 100644 (file)
@@ -6,6 +6,8 @@ CpvDeclare(int, CldBalanceHandlerIndex);
 CpvDeclare(int, CldRelocatedMessages);
 CpvDeclare(int, CldLoadBalanceMessages);
 CpvDeclare(int, CldMessageChunks);
+CpvDeclare(int, CldLoadNotify);
+extern void LoadNotifyFn(int);
 
 /* Estimator stuff.  Of any use? */
 /*
@@ -96,6 +98,8 @@ static void CldTokenHandler(CldToken tok)
   }
   else 
     CpvAccess(CldLoadOffset)--;
+  if (CpvAccess(CldLoadNotify))
+    LoadNotifyFn(CpvAccess(CldProc)->load);
 }
 
 int CldCountTokens()
@@ -124,11 +128,9 @@ void CldPutToken(char *msg)
   tok->pred->succ = tok;
   tok->succ->pred = tok;
   proc->load ++;
-  
   /* add token to the scheduler */
   CmiSetHandler(tok, proc->tokenhandleridx);
   ifn(msg, &pfn, &len, &queueing, &priobits, &prioptr);
-
   queueing = CQS_QUEUEING_LIFO; 
   CsdEnqueueGeneral(tok, queueing, priobits, prioptr);
 }
index b0b822c25d8046bfeeb090396e552e6d1733f0d3..b3f9b9be9f77603fd1c31ddfd3f19b6c52990b71 100644 (file)
@@ -9,5 +9,6 @@ CpvExtern(int, CldBalanceHandlerIndex);
 CpvExtern(int, CldRelocatedMessages);
 CpvExtern(int, CldLoadBalanceMessages);
 CpvExtern(int, CldMessageChunks);
+CpvExtern(int, CldLoadNotify);
 
 void CldMultipleSend(int pe, int numToSend);