[openrtm-commit:02121] r2805 - in trunk/OpenRTM-aist: etc src/lib/rtm

openrtm @ openrtm.org openrtm @ openrtm.org
2016年 11月 18日 (金) 02:04:47 JST


Author: n-ando
Date: 2016-11-18 02:04:47 +0900 (Fri, 18 Nov 2016)
New Revision: 2805

Modified:
   trunk/OpenRTM-aist/etc/component.conf
   trunk/OpenRTM-aist/src/lib/rtm/PeriodicExecutionContext.cpp
Log:
[incompat,->RELENG_1_2] CPU affinity setting for ExecutionContext (only PeriodicEC) has been added. refs #3711

Modified: trunk/OpenRTM-aist/etc/component.conf
===================================================================
--- trunk/OpenRTM-aist/etc/component.conf	2016-11-17 16:44:45 UTC (rev 2804)
+++ trunk/OpenRTM-aist/etc/component.conf	2016-11-17 17:04:47 UTC (rev 2805)
@@ -81,6 +81,17 @@
 # exec_cxt.reset_timeout: 0.5
 
 #
+# EC's CPU affinity setting
+#
+# This option make the EC bound to specific CPU(s).  Options must
+# be one or more comma separated numbers to identify CPU ID. CPU ID
+# is started from 0, and maximum number is number of CPU core -1.  If
+# invalid CPU ID is specified, all the CPU will be used for the EC.
+#
+# Example:
+#   exec_cxt.cpu_affinity: 0, 1, 2, ...
+
+#
 # Specifying Execution Contexts
 #
 # Default: No default

Modified: trunk/OpenRTM-aist/src/lib/rtm/PeriodicExecutionContext.cpp
===================================================================
--- trunk/OpenRTM-aist/src/lib/rtm/PeriodicExecutionContext.cpp	2016-11-17 16:44:45 UTC (rev 2804)
+++ trunk/OpenRTM-aist/src/lib/rtm/PeriodicExecutionContext.cpp	2016-11-17 17:04:47 UTC (rev 2805)
@@ -149,7 +149,10 @@
       }
     for (size_t j(0); j < CPU_SETSIZE; ++j)
       {
-        if (CPU_ISSET(j, &cpu_set)) { RTC_DEBUG(("CPU %d is set.", j)); }
+        if (CPU_ISSET(j, &cpu_set))
+          {
+            RTC_DEBUG(("Current CPU affinity mask is %d.", j));
+          }
       }
 #endif // RTM_OS_LINUX
 



More information about the openrtm-commit mailing list