Changeset 8823
- Timestamp:
- 01/24/08 09:10:00 (17 years ago)
- Location:
- trunk/MagicSoft/Cosy
- Files:
-
- 9 added
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Cosy/candrv/nodedrv.cc
r8813 r8823 484 484 // least one Nodeguard message was answered. 485 485 // 486 class NodeGuard : public M Thread486 class NodeGuard : public MyThreadX 487 487 { 488 488 Double_t fTimeoutTime; //[s] … … 496 496 public: 497 497 NodeGuard(NodeDrv *drv, Int_t guard, Int_t ltf, Bool_t canopen) 498 : M Thread(false), fGuardTime(guard/1000.), fLifeTimeFactor(ltf), fIsCanOpen(canopen), fDrv(drv) { }498 : MyThreadX("NodeGuard"), fGuardTime(guard/1000.), fLifeTimeFactor(ltf), fIsCanOpen(canopen), fDrv(drv) { } 499 499 500 500 void Reset(const timeval_t *tv=NULL) … … 509 509 } 510 510 511 void *Thread()511 Int_t Thread() 512 512 { 513 513 Reset(); 514 514 515 while (! HasStopFlag())515 while (!IsThreadCanceled()) 516 516 { 517 517 // Sending nodeguards seems to result in … … 527 527 const Double_t t0 = t+fGuardTime; 528 528 529 while ( !HasStopFlag() &&(double)t<t0 && (double)t<fTimeoutTime)529 while ((double)t<t0 && (double)t<fTimeoutTime) 530 530 { 531 usleep(5);531 Sleep(100); 532 532 t.Now(); 533 533 } … … 553 553 554 554 fGuard = new NodeGuard(this, fGuardTime, fLifeTimeFactor, real); 555 fGuard-> Start();555 fGuard->RunThread(); 556 556 557 557 lout << "- " << GetNodeName() << ": Guarding (" << dec;
Note:
See TracChangeset
for help on using the changeset viewer.