summaryrefslogtreecommitdiff
path: root/ACE/ace/config-linux.h
diff options
context:
space:
mode:
authorJohnny Willemsen <jwillemsen@remedy.nl>2013-08-09 16:54:08 +0000
committerJohnny Willemsen <jwillemsen@remedy.nl>2013-08-09 16:54:08 +0000
commitfb19d9f5c0b9d5306a678d6a97b9601886d22cc4 (patch)
tree3cac54309998d56fd3e3e12f5acefbfac17a57fd /ACE/ace/config-linux.h
parent647490bf49e1855e18aa30af693ba33c6a102ebc (diff)
downloadATCD-fb19d9f5c0b9d5306a678d6a97b9601886d22cc4.tar.gz
Fri Aug 9 16:53:17 UTC 2013 Johnny Willemsen <jwillemsen@remedy.nl>
* ace/config-linux.h: Linux kernel 2.8.8 and newer have sched_getaffinity and sched_getaffinity
Diffstat (limited to 'ACE/ace/config-linux.h')
-rw-r--r--ACE/ace/config-linux.h15
1 files changed, 9 insertions, 6 deletions
diff --git a/ACE/ace/config-linux.h b/ACE/ace/config-linux.h
index 3115b40d499..641ac9b2541 100644
--- a/ACE/ace/config-linux.h
+++ b/ACE/ace/config-linux.h
@@ -356,13 +356,14 @@
# define ACE_HAS_GETIFADDRS
#endif
+#if !defined (ACE_LACKS_LINUX_VERSION_H)
+# include <linux/version.h>
+#endif /* !ACE_LACKS_LINUX_VERSION_H */
+
#if !defined (ACE_GETNAME_RETURNS_RANDOM_SIN_ZERO)
// Detect if getsockname() and getpeername() returns random values in
// the sockaddr_in::sin_zero field by evaluation of the kernel
// version. Since version 2.5.47 this problem is fixed.
-# if !defined (ACE_LACKS_LINUX_VERSION_H)
-# include <linux/version.h>
-# endif /* !ACE_LACKS_LINUX_VERSION_H */
# if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,47))
# define ACE_GETNAME_RETURNS_RANDOM_SIN_ZERO 0
# else
@@ -371,14 +372,16 @@
#endif /* ACE_GETNAME_RETURNS_RANDOM_SIN_ZERO */
#if !defined (ACE_HAS_EVENT_POLL) && !defined (ACE_HAS_DEV_POLL)
-# if !defined (ACE_LACKS_LINUX_VERSION_H)
-# include <linux/version.h>
-# endif /* !ACE_LACKS_LINUX_VERSION_H */
# if (LINUX_VERSION_CODE > KERNEL_VERSION (2,6,0))
# define ACE_HAS_EVENT_POLL
# endif
#endif
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,8))
+# define ACE_HAS_SCHED_GETAFFINITY 1
+# define ACE_HAS_SCHED_SETAFFINITY 1
+#endif
+
// This is ghastly, but as long as there are platforms supported
// which define the right POSIX macros but lack actual support
// we have no choice.