Hi Jennifer and I have a series of changes pending to RTEMS that add cpuset tests, pthread affinity APIs and Classic API affinity APIs. These depend on the presence of certain prototypes and data types in newlib.
In an attempt to keep things building with old tools, I have attached a set of patches that I think can be used to detect enough of the changes to let git bisect continue to work across the tool changes. For sure, our (unmerged) code will have to use the proper conditionals to prevent itself from being compiled. The one I don't know about it Sebastian's re-implementation of pthread cleanup push/pop. I don't know how to detect that change. How do these patches look? And any suggestions? The changes to newlib are on the cvs head -- pthread.h and cpuset.h primarily. -- Joel Sherrill, Ph.D. Director of Research & Development joel.sherr...@oarcorp.com On-Line Applications Research Ask me about RTEMS: a free RTOS Huntsville AL 35805 Support Available (256) 722-9985
>From 66e0e950ba3e9a878054bfe3ae66583e7413dfd9 Mon Sep 17 00:00:00 2001 From: Joel Sherrill <joel.sherr...@oarcorp.com> Date: Mon, 9 Dec 2013 14:22:13 -0600 Subject: [PATCH 1/2] psxtests/configure.ac: Probe for SMP affinity methods --- testsuites/psxtests/configure.ac | 21 +++++++++++++++++++++ 1 files changed, 21 insertions(+), 0 deletions(-) diff --git a/testsuites/psxtests/configure.ac b/testsuites/psxtests/configure.ac index 8e0a238..16676a4 100644 --- a/testsuites/psxtests/configure.ac +++ b/testsuites/psxtests/configure.ac @@ -48,6 +48,27 @@ AC_CHECK_DECLS([pthread_attr_getguardsize],[],[],[[#include <pthread.h>]]) # Added to pthreads after initial revision. May not be in toolset AC_CHECK_DECLS([pthread_attr_setguardsize],[],[],[[#include <pthread.h>]]) +# Added to newlib pthreads for RTEMS SMP (np), may not be present +AC_CHECK_DECLS([pthread_attr_setaffinity_np],[].[],,[[#include <pthread.h>]]) + +# Added to newlib pthreads for RTEMS SMP (np), may not be present +AC_CHECK_DECLS([pthread_attr_getaffinity_np],[].[],,[[#include <pthread.h>]]) + +# Added to newlib pthreads for RTEMS SMP (np), may not be present +AC_CHECK_DECLS([pthread_setaffinity_np],[].[],,[[#include <pthread.h>]]) + +# Added to newlib pthreads for RTEMS SMP (np), may not be present +AC_CHECK_DECLS([pthread_getaffinity_np],[].[],,[[#include <pthread.h>]]) + +# Added to newlib pthreads for RTEMS (np), may not be present +AC_CHECK_DECLS([pthread_getattr_np],[].[],,[[#include <pthread.h>]]) + +# Added to newlib pthreads for RTEMS SMP (np), may not be present +AC_CHECK_HEADERS([cpuset.h]) + +# Mandated by POSIX, not declared in some versions of newlib. +AC_CHECK_DECLS([getrusage],,,[#include sys/resource.h]) + # Mandated by POSIX, not declared in some versions of newlib. AC_CHECK_DECLS([getrusage],,,[#include sys/resource.h]) -- 1.7.1
>From 4074396d91b85179cf1b343916d2874beb582f21 Mon Sep 17 00:00:00 2001 From: Joel Sherrill <joel.sherr...@oarcorp.com> Date: Mon, 9 Dec 2013 14:22:33 -0600 Subject: [PATCH 2/2] cpukit/configure.ac: Probe for SMP affinity methods --- cpukit/configure.ac | 8 ++++++++ 1 files changed, 8 insertions(+), 0 deletions(-) diff --git a/cpukit/configure.ac b/cpukit/configure.ac index 38d2dd9..211f527 100644 --- a/cpukit/configure.ac +++ b/cpukit/configure.ac @@ -97,6 +97,14 @@ RTEMS_CHECK_FUNC([pthread_attr_setguardsize],[#include <pthread.h>]) RTEMS_CHECK_FUNC([pthread_attr_setstack],[#include <pthread.h>]) RTEMS_CHECK_FUNC([pthread_attr_getstack],[#include <pthread.h>]) +# These are SMP related and were added to newlib by RTEMS. +RTEMS_CHECK_FUNC([pthread_attr_setaffinity_np],[#include <pthread.h>]) +RTEMS_CHECK_FUNC([pthread_attr_getaffinity_np],[#include <pthread.h>]) +RTEMS_CHECK_FUNC([pthread_setaffinity_np],[#include <pthread.h>]) +RTEMS_CHECK_FUNC([pthread_getaffinity_np],[#include <pthread.h>]) +RTEMS_CHECK_FUNC([pthread_getattr_np],[#include <pthread.h>]) +AC_CHECK_HEADERS([cpuset.h]) + # Mandated by POSIX, not declared in some versions of newlib. AC_CHECK_DECLS([getrusage],,,[#include sys/resource.h]) -- 1.7.1
_______________________________________________ rtems-devel mailing list rtems-devel@rtems.org http://www.rtems.org/mailman/listinfo/rtems-devel