[PATCH 1/1] confdefs: Fix cyclic dependency

Gedare Bloom gedare at rtems.org
Fri Aug 21 16:13:12 UTC 2020


this looks ok to apply to 5

I'm guessing without it that configuring for MP isn't working?

On Fri, Aug 21, 2020 at 12:59 AM Sebastian Huber
<sebastian.huber at embedded-brains.de> wrote:
>
> Close #4060.
> ---
>  cpukit/include/rtems/confdefs/mpci.h    | 13 ++-----------
>  cpukit/include/rtems/confdefs/threads.h |  7 ++++++-
>  2 files changed, 8 insertions(+), 12 deletions(-)
>
> diff --git a/cpukit/include/rtems/confdefs/mpci.h b/cpukit/include/rtems/confdefs/mpci.h
> index e4d9737b31..0a9be4a2ea 100644
> --- a/cpukit/include/rtems/confdefs/mpci.h
> +++ b/cpukit/include/rtems/confdefs/mpci.h
> @@ -6,9 +6,6 @@
>   * @ingroup RTEMSApplicationConfiguration
>   *
>   * @brief Evaluate MPCI Configuration Options
> - *
> - * This header file defines _CONFIGURE_MPCI_RECEIVE_SERVER_COUNT for use by
> - * other configuration header files.
>   */
>
>  /*
> @@ -49,6 +46,8 @@
>
>  #ifdef CONFIGURE_MP_APPLICATION
>
> +#include <rtems/confdefs/threads.h>
> +
>  #ifndef CONFIGURE_EXTRA_MPCI_RECEIVE_SERVER_STACK
>    #define CONFIGURE_EXTRA_MPCI_RECEIVE_SERVER_STACK 0
>  #endif
> @@ -83,8 +82,6 @@
>    #error "CONFIGURE_MP_NODE_NUMBER must be less than or equal to CONFIGURE_MP_MAXIMUM_NODES"
>  #endif
>
> -#define _CONFIGURE_MPCI_RECEIVE_SERVER_COUNT 1
> -
>  #ifdef __cplusplus
>  extern "C" {
>  #endif
> @@ -126,10 +123,6 @@ RTEMS_SECTION( ".rtemsstack.mpci" );
>  }
>  #endif
>
> -#else /* CONFIGURE_MP_APPLICATION */
> -
> -#define _CONFIGURE_MPCI_RECEIVE_SERVER_COUNT 0
> -
>  #endif /* CONFIGURE_MP_APPLICATION */
>
>  #else /* RTEMS_MULTIPROCESSING */
> @@ -138,8 +131,6 @@ RTEMS_SECTION( ".rtemsstack.mpci" );
>    #error "CONFIGURE_MP_APPLICATION must not be defined if multiprocessing is disabled"
>  #endif
>
> -#define _CONFIGURE_MPCI_RECEIVE_SERVER_COUNT 0
> -
>  #endif /* RTEMS_MULTIPROCESSING */
>
>  #endif /* CONFIGURE_INIT */
> diff --git a/cpukit/include/rtems/confdefs/threads.h b/cpukit/include/rtems/confdefs/threads.h
> index 7288243ead..12726487ba 100644
> --- a/cpukit/include/rtems/confdefs/threads.h
> +++ b/cpukit/include/rtems/confdefs/threads.h
> @@ -44,7 +44,6 @@
>
>  #include <rtems/confdefs/bdbuf.h>
>  #include <rtems/confdefs/extensions.h>
> -#include <rtems/confdefs/mpci.h>
>  #include <rtems/confdefs/percpu.h>
>  #include <rtems/confdefs/scheduler.h>
>  #include <rtems/confdefs/unlimited.h>
> @@ -197,6 +196,12 @@ const size_t _Thread_Initial_thread_count =
>    rtems_resource_maximum_per_allocation( _CONFIGURE_TASKS ) +
>    rtems_resource_maximum_per_allocation( CONFIGURE_MAXIMUM_POSIX_THREADS );
>
> +#if defined(RTEMS_MULTIPROCESSING) && defined(CONFIGURE_MP_APPLICATION)
> +  #define _CONFIGURE_MPCI_RECEIVE_SERVER_COUNT 1
> +#else
> +  #define _CONFIGURE_MPCI_RECEIVE_SERVER_COUNT 0
> +#endif
> +
>  THREAD_INFORMATION_DEFINE(
>    _Thread,
>    OBJECTS_INTERNAL_API,
> --
> 2.26.2
>
> _______________________________________________
> devel mailing list
> devel at rtems.org
> http://lists.rtems.org/mailman/listinfo/devel


More information about the devel mailing list