[openrtm-commit:03129] r3197 - in branches/RELENG_1_2/OpenRTM-aist/src/lib: coil/posix/coil rtm

openrtm @ openrtm.org openrtm @ openrtm.org
2018年 1月 24日 (水) 10:06:36 JST


Author: miyamoto
Date: 2018-01-24 10:06:36 +0900 (Wed, 24 Jan 2018)
New Revision: 3197

Modified:
   branches/RELENG_1_2/OpenRTM-aist/src/lib/coil/posix/coil/Affinity.cpp
   branches/RELENG_1_2/OpenRTM-aist/src/lib/rtm/PeriodicExecutionContext.cpp
Log:
[compat, ->RELENG_1_2] refs #3711

Modified: branches/RELENG_1_2/OpenRTM-aist/src/lib/coil/posix/coil/Affinity.cpp
===================================================================
--- branches/RELENG_1_2/OpenRTM-aist/src/lib/coil/posix/coil/Affinity.cpp	2018-01-24 00:12:27 UTC (rev 3196)
+++ branches/RELENG_1_2/OpenRTM-aist/src/lib/coil/posix/coil/Affinity.cpp	2018-01-24 01:06:36 UTC (rev 3197)
@@ -38,7 +38,7 @@
       {
         if (CPU_ISSET(i, &cpu_set))
           {
-            cpu_mask.push_back((unsigned int)i);
+            cpu_mask.push_back((unsigned int)i+1);
           }
       }
     return true;
@@ -88,7 +88,7 @@
       {
         if (CPU_ISSET(i, &cpu_set))
           {
-            cpu_mask.push_back((unsigned int)i);
+            cpu_mask.push_back((unsigned int)i+1);
           }
       }
     return true;

Modified: branches/RELENG_1_2/OpenRTM-aist/src/lib/rtm/PeriodicExecutionContext.cpp
===================================================================
--- branches/RELENG_1_2/OpenRTM-aist/src/lib/rtm/PeriodicExecutionContext.cpp	2018-01-24 00:12:27 UTC (rev 3196)
+++ branches/RELENG_1_2/OpenRTM-aist/src/lib/rtm/PeriodicExecutionContext.cpp	2018-01-24 01:06:36 UTC (rev 3197)
@@ -134,13 +134,12 @@
 	
 	coil::CpuMask ret_cpu;
 	result = coil::getThreadCpuAffinity(ret_cpu);
-
 	
 
 #ifdef RTM_OS_LINUX
 	std::sort(ret_cpu.begin(), ret_cpu.end());
 	std::sort(m_cpu.begin(), m_cpu.end());
-	if (   result && ret_cpu.size() == ret_cpu.size()
+	if (result && ret_cpu.size() > 0 && m_cpu.size() > 0 && ret_cpu.size() == m_cpu.size()
         && std::equal(ret_cpu.begin(), ret_cpu.end(), m_cpu.begin()))
 	{
 



More information about the openrtm-commit mailing list