diff options
author | Johnny Willemsen <jwillemsen@remedy.nl> | 2013-08-09 16:57:26 +0000 |
---|---|---|
committer | Johnny Willemsen <jwillemsen@remedy.nl> | 2013-08-09 16:57:26 +0000 |
commit | 590842fd8d06bf12ff923416bedc38016e442292 (patch) | |
tree | b2bb0af28a2137c5cea56cd32486f118815cae83 /CIAO/tests | |
parent | dc28422e2e7a17626ad0d693bb1a95e6b0745970 (diff) | |
download | ATCD-590842fd8d06bf12ff923416bedc38016e442292.tar.gz |
Fri Aug 9 16:57:32 UTC 2013 Johnny Willemsen <jwillemsen@remedy.nl>
* tests/DAnCE/LocalityManager/CPUAffinity/CPUAffinity_exec.cpp:
Use ACE_HAS_SCHED_GETAFFINITY instead of checking the
linux kernel version here
Diffstat (limited to 'CIAO/tests')
-rw-r--r-- | CIAO/tests/DAnCE/LocalityManager/CPUAffinity/CPUAffinity_exec.cpp | 14 |
1 files changed, 2 insertions, 12 deletions
diff --git a/CIAO/tests/DAnCE/LocalityManager/CPUAffinity/CPUAffinity_exec.cpp b/CIAO/tests/DAnCE/LocalityManager/CPUAffinity/CPUAffinity_exec.cpp index 820247ae8db..c7ba33c8896 100644 --- a/CIAO/tests/DAnCE/LocalityManager/CPUAffinity/CPUAffinity_exec.cpp +++ b/CIAO/tests/DAnCE/LocalityManager/CPUAffinity/CPUAffinity_exec.cpp @@ -3,17 +3,11 @@ #include "CPUAffinity_exec.h" #include "ace/Log_Msg.h" +#include "ace/os_include/os_sched.h" #include "tao/ORB_Core.h" #include "tao/Transport_Cache_Manager.h" #include "tao/Thread_Lane_Resources.h" -#if defined (LINUX_VERSION_CODE) && defined (KERNEL_VERSION) -# if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,8)) -#include <sched.h> - -#endif -#endif - namespace CIAO_cpuaffinity_A_Impl { //============================================================ @@ -61,9 +55,7 @@ namespace CIAO_cpuaffinity_A_Impl void Component_exec_i::ccm_activate (void) { -#if defined (LINUX_VERSION_CODE) && defined (KERNEL_VERSION) -# if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,8)) - +#if defined (ACE_HAS_SCHED_GETAFFINITY) if (ACE_OS::num_processors () < 2) { ACE_DEBUG ((LM_DEBUG, "This machine only has a single processor, aborting\n")); @@ -101,8 +93,6 @@ namespace CIAO_cpuaffinity_A_Impl { ACE_ERROR ((LM_ERROR, "Error: Trying to test an affinity I don't support\n")); } - -#endif #endif } |