Revision 6b81f4fa src/sim/csimulation.cc

View differences:

src/sim/csimulation.cc
641 641

  
642 642
    try
643 643
    {
644
#ifdef NOBARRIER
645
        //TODO move to scheduler?
646
        // Do we have to wait for a barrier?
647
        if(threaded)
648
        {
649
            threadPool->waitAtBarrier(&msgQueue);
650
        }
651
#endif
652

  
653 644
        msg = schedulerp->getNextEvent();
654 645

  
655 646
        //Advance Simulation Time
......
670 661
            // in parallel
671 662
            cAsyncModule* aMod = (cAsyncModule*) mod;
672 663

  
673
            simtime_t duration = aMod->getProcessingDelay(msg);
664
            simtime_t duration = msg->getEventDuration();
674 665
            if (duration < SimTime::simTimeZero)
675 666
            {
676 667
                throw cRuntimeError("negative event duration not allowed.");
677 668
            }
678
            msg->setEventDuration(duration);
679 669

  
680 670
            bool mayPar = aMod->mayParallelize(msg, duration);
681 671
            // execute this event in parallel

Also available in: Unified diff