[rtems-schedsim commit] sys/cpuset.h: CPU_COPY missing on GNU/Linux

Joel Sherrill joel at rtems.org
Wed May 14 14:47:38 UTC 2014


Module:    rtems-schedsim
Branch:    master
Commit:    3dd3ae6d65a8fa47199d54fb3c92da438e989883
Changeset: http://git.rtems.org/rtems-schedsim/commit/?id=3dd3ae6d65a8fa47199d54fb3c92da438e989883

Author:    Joel Sherrill <joel.sherrill at oarcorp.com>
Date:      Wed May 14 08:24:36 2014 -0500

sys/cpuset.h: CPU_COPY missing on GNU/Linux

---

 schedsim/rtems/sched_cpu/sys/cpuset.h |   14 ++++++++++++++
 1 files changed, 14 insertions(+), 0 deletions(-)

diff --git a/schedsim/rtems/sched_cpu/sys/cpuset.h b/schedsim/rtems/sched_cpu/sys/cpuset.h
index d89bb68..c392a39 100644
--- a/schedsim/rtems/sched_cpu/sys/cpuset.h
+++ b/schedsim/rtems/sched_cpu/sys/cpuset.h
@@ -2,8 +2,22 @@
  *  On Linux, the cpu_set_t is defined here proteted with _GNU_SOURCE
  *  and it is defined in Makefile.am`
  */
+
+#ifndef __SCHEDSIM_SYS_CPUSET_h
+#define __SCHEDSIM_SYS_CPUSET_h
+
 #include <sched.h>
 #ifndef __CPU_ZERO_S
 #error "__CPU_ZERO_S not defined - check configuration"
 #endif
 
+#if defined(__gnu_linux__)
+/* This was not defined as of at least CentOS 6.x */
+/* copy src set to dest set */
+static __inline void CPU_COPY( cpu_set_t *dest, const cpu_set_t *src )
+{
+  *dest = *src;
+}
+#endif
+
+#endif




More information about the vc mailing list