summaryrefslogtreecommitdiff
path: root/DAnCE
diff options
context:
space:
mode:
authorJohnny Willemsen <jwillemsen@remedy.nl>2013-08-09 16:55:17 +0000
committerJohnny Willemsen <jwillemsen@remedy.nl>2013-08-09 16:55:17 +0000
commitdc28422e2e7a17626ad0d693bb1a95e6b0745970 (patch)
treedcca8b347fef825f1d149a066d29fe23a2b85202 /DAnCE
parentfb19d9f5c0b9d5306a678d6a97b9601886d22cc4 (diff)
downloadATCD-dc28422e2e7a17626ad0d693bb1a95e6b0745970.tar.gz
Fri Aug 9 16:54:51 UTC 2013 Johnny Willemsen <jwillemsen@remedy.nl>
* dance/LocalityManager/Configuration/CPU_Affinity.cpp: Use ACE_HAS_SCHED_SETAFFINITY instead of checking the linux kernel version here
Diffstat (limited to 'DAnCE')
-rw-r--r--DAnCE/ChangeLog6
-rw-r--r--DAnCE/dance/LocalityManager/Configuration/CPU_Affinity.cpp16
2 files changed, 10 insertions, 12 deletions
diff --git a/DAnCE/ChangeLog b/DAnCE/ChangeLog
index 0b3da695184..a17a65f231c 100644
--- a/DAnCE/ChangeLog
+++ b/DAnCE/ChangeLog
@@ -1,3 +1,9 @@
+Fri Aug 9 16:54:51 UTC 2013 Johnny Willemsen <jwillemsen@remedy.nl>
+
+ * dance/LocalityManager/Configuration/CPU_Affinity.cpp:
+ Use ACE_HAS_SCHED_SETAFFINITY instead of checking the
+ linux kernel version here
+
Fri Aug 9 08:33:10 UTC 2013 Johnny Willemsen <jwillemsen@remedy.nl>
* tools/Config_Handlers/DynAny_Handler/DataType_Handler.cpp:
diff --git a/DAnCE/dance/LocalityManager/Configuration/CPU_Affinity.cpp b/DAnCE/dance/LocalityManager/Configuration/CPU_Affinity.cpp
index cb83959df15..9a60bde8972 100644
--- a/DAnCE/dance/LocalityManager/Configuration/CPU_Affinity.cpp
+++ b/DAnCE/dance/LocalityManager/Configuration/CPU_Affinity.cpp
@@ -3,18 +3,12 @@
#include "CPU_Affinity.h"
#include "dance/DAnCE_PropertiesC.h"
#include "dance/Deployment/Deployment_StartErrorC.h"
-
#include "dance/Logger/Log_Macros.h"
-
-#if defined (LINUX_VERSION_CODE) && defined (KERNEL_VERSION)
-# if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,8))
-#include <sched.h>
-#include <sstream>
+#include "ace/os_include/os_sched.h"
#include "ace/Auto_Ptr.h"
#include "ace/Tokenizer_T.h"
#include "ace/OS_NS_unistd.h"
-#endif
-#endif
+#include <sstream>
namespace DAnCE
{
@@ -34,9 +28,8 @@ namespace DAnCE
void CPU_Affinity::configure (const ::Deployment::Property & prop)
{
-#if defined (LINUX_VERSION_CODE) && defined (KERNEL_VERSION)
-# if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,8))
- const char *extracted_affinity;
+#if defined (ACE_HAS_SCHED_SETAFFINITY)
+ const char *extracted_affinity = 0;
if (! (prop.value >>= CORBA::Any::to_string (extracted_affinity, 0)))
{
@@ -111,7 +104,6 @@ namespace DAnCE
return;
#endif
-#endif
throw ::Deployment::StartError (prop.name.in (),
"CPU Affinity not supported on this platform");