[openrtm-commit:00660] r2305 - trunk/OpenRTM-aist/src/lib/rtm

openrtm @ openrtm.org openrtm @ openrtm.org
2012年 2月 6日 (月) 06:20:13 JST


Author: n-ando
Date: 2012-02-06 06:20:12 +0900 (Mon, 06 Feb 2012)
New Revision: 2305

Modified:
   trunk/OpenRTM-aist/src/lib/rtm/ExecutionContextWorker.cpp
Log:
[compat,impl,bugfix] The component list locks in the worker invoker have been removed. The list is always changed in updateComponentList() refs #2352

Modified: trunk/OpenRTM-aist/src/lib/rtm/ExecutionContextWorker.cpp
===================================================================
--- trunk/OpenRTM-aist/src/lib/rtm/ExecutionContextWorker.cpp	2012-02-05 01:35:02 UTC (rev 2304)
+++ trunk/OpenRTM-aist/src/lib/rtm/ExecutionContextWorker.cpp	2012-02-05 21:20:12 UTC (rev 2305)
@@ -5,9 +5,8 @@
  * @date $Date: 2008-01-14 07:53:01 $
  * @author Noriaki Ando <n-ando at aist.go.jp>
  *
- * Copyright (C) 2006-2008
+ * Copyright (C) 2006-2008,2012
  *     Noriaki Ando
- *     Task-intelligence Research Group,
  *     Intelligent Systems Research Institute,
  *     National Institute of
  *         Advanced Industrial Science and Technology (AIST), Japan
@@ -442,11 +441,11 @@
     for (size_t i(0); i < len; ++i) { m_comps[i]->workerPostDo(); }
     updateComponentList();
   }
-  
+
   void ExecutionContextWorker::invokeWorkerPreDo()
   {
     RTC_PARANOID(("invokeWorkerPreDo()"));
-    Guard gurad(m_mutex);
+    // m_comps never changes its size here
     size_t len(m_comps.size());
     for (size_t i(0); i < len; ++i) { m_comps[i]->workerPreDo();  }
   }
@@ -454,7 +453,7 @@
   void ExecutionContextWorker::invokeWorkerDo()
   {
     RTC_PARANOID(("invokeWorkerDo()"));
-    Guard gurad(m_mutex);
+    // m_comps never changes its size here
     size_t len(m_comps.size());
     for (size_t i(0); i < len; ++i) { m_comps[i]->workerDo();     }
   }
@@ -462,11 +461,12 @@
   void ExecutionContextWorker::invokeWorkerPostDo()
   {
     RTC_PARANOID(("invokeWorkerPostDo()"));
-    Guard gurad(m_mutex);
+    // m_comps never changes its size here
     size_t len(m_comps.size());
     for (size_t i(0); i < len; ++i) { m_comps[i]->workerPostDo(); }
+    // m_comps might be changed here
     updateComponentList();
   }
-  
+
 }; // namespace RTC_impl
 



openrtm-commit メーリングリストの案内