[Avida-SVN] r2598 - branches/jobScheduling/source/cpu

beckma24 at myxo.css.msu.edu beckma24 at myxo.css.msu.edu
Thu May 29 10:31:09 PDT 2008


Author: beckma24
Date: 2008-05-29 13:31:08 -0400 (Thu, 29 May 2008)
New Revision: 2598

Modified:
   branches/jobScheduling/source/cpu/cHardwareCPU.cc
Log:
Fix problem with sleep logging when sleep is interrupted by alarm

Modified: branches/jobScheduling/source/cpu/cHardwareCPU.cc
===================================================================
--- branches/jobScheduling/source/cpu/cHardwareCPU.cc	2008-05-27 19:50:27 UTC (rev 2597)
+++ branches/jobScheduling/source/cpu/cHardwareCPU.cc	2008-05-29 17:31:08 UTC (rev 2598)
@@ -5026,6 +5026,10 @@
       // move IP to here
       IP().Set(search_head.GetPosition());
       m_advance_ip = false; // Don't automatically move the IP
+      if(organism->IsSleeping()) {
+        organism->SetSleeping(false);
+        m_world->GetStats().decNumAsleep(organism->GetOrgInterface().GetDemeID());
+      }
       return true;
     }
     search_head++;




More information about the Avida-cvs mailing list