[PATCH] config: Add SMP scheduler configuration errors

Joel Sherrill joel.sherrill at gmail.com
Mon Sep 5 14:20:03 UTC 2022


This looks good.

On Mon, Sep 5, 2022, 7:19 AM Sebastian Huber <
sebastian.huber at embedded-brains.de> wrote:

> Issue an error message if a SMP-specific scheduler is used and RTEMS_SMP
> is disabled.  This might be a more informative compared to compiler or
> linker errors.
> ---
>  cpukit/include/rtems/scheduler.h | 20 ++++++++++++++++++++
>  1 file changed, 20 insertions(+)
>
> diff --git a/cpukit/include/rtems/scheduler.h
> b/cpukit/include/rtems/scheduler.h
> index d5c7e51ef5..a8004cb5e4 100644
> --- a/cpukit/include/rtems/scheduler.h
> +++ b/cpukit/include/rtems/scheduler.h
> @@ -132,6 +132,10 @@
>  #endif
>
>  #ifdef CONFIGURE_SCHEDULER_EDF_SMP
> +  #ifndef RTEMS_SMP
> +    #error "CONFIGURE_SCHEDULER_EDF_SMP cannot be used if RTEMS_SMP is
> disabled"
> +  #endif
> +
>    #include <rtems/score/scheduleredfsmp.h>
>
>    #ifndef CONFIGURE_MAXIMUM_PROCESSORS
> @@ -198,6 +202,10 @@
>  #endif
>
>  #ifdef CONFIGURE_SCHEDULER_PRIORITY_AFFINITY_SMP
> +  #ifndef RTEMS_SMP
> +    #error "CONFIGURE_SCHEDULER_PRIORITY_AFFINITY_SMP cannot be used if
> RTEMS_SMP is disabled"
> +  #endif
> +
>    #include <rtems/score/schedulerpriorityaffinitysmp.h>
>
>    #define SCHEDULER_PRIORITY_AFFINITY_SMP_CONTEXT_NAME( name ) \
> @@ -230,6 +238,10 @@
>  #endif
>
>  #ifdef CONFIGURE_SCHEDULER_PRIORITY_SMP
> +  #ifndef RTEMS_SMP
> +    #error "CONFIGURE_SCHEDULER_PRIORITY_SMP cannot be used if RTEMS_SMP
> is disabled"
> +  #endif
> +
>    #include <rtems/score/schedulerprioritysmp.h>
>
>    #define SCHEDULER_PRIORITY_SMP_CONTEXT_NAME( name ) \
> @@ -262,6 +274,10 @@
>  #endif
>
>  #ifdef CONFIGURE_SCHEDULER_STRONG_APA
> +  #ifndef RTEMS_SMP
> +    #error "CONFIGURE_SCHEDULER_STRONG_APA cannot be used if RTEMS_SMP is
> disabled"
> +  #endif
> +
>    #include <rtems/score/schedulerstrongapa.h>
>
>    #ifndef CONFIGURE_MAXIMUM_PROCESSORS
> @@ -324,6 +340,10 @@
>  #endif
>
>  #ifdef CONFIGURE_SCHEDULER_SIMPLE_SMP
> +  #ifndef RTEMS_SMP
> +    #error "CONFIGURE_SCHEDULER_SIMPLE_SMP cannot be used if RTEMS_SMP is
> disabled"
> +  #endif
> +
>    #include <rtems/score/schedulersimplesmp.h>
>
>    #define SCHEDULER_SIMPLE_SMP_CONTEXT_NAME( name ) \
> --
> 2.35.3
>
> _______________________________________________
> devel mailing list
> devel at rtems.org
> http://lists.rtems.org/mailman/listinfo/devel
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rtems.org/pipermail/devel/attachments/20220905/e96889c2/attachment-0001.htm>


More information about the devel mailing list