From 8776bb94197613a369b47b3adf4b2d4e0ba766ed Mon Sep 17 00:00:00 2001 From: Sebastian Huber Date: Wed, 26 Sep 2018 06:34:54 +0200 Subject: score: Remove CPU_PROVIDES_IDLE_THREAD_BODY Remove the CPU_PROVIDES_IDLE_THREAD_BODY option to avoid unnecessary conditional compilation. Close #3539. --- cpukit/score/cpu/no_cpu/Makefile.am | 1 + cpukit/score/cpu/no_cpu/cpuidle.c | 28 ++++++++++++++++++++++ cpukit/score/cpu/no_cpu/include/rtems/score/cpu.h | 29 ----------------------- 3 files changed, 29 insertions(+), 29 deletions(-) create mode 100644 cpukit/score/cpu/no_cpu/cpuidle.c (limited to 'cpukit/score/cpu/no_cpu') diff --git a/cpukit/score/cpu/no_cpu/Makefile.am b/cpukit/score/cpu/no_cpu/Makefile.am index 0d89f5af2b..b5f59e56f8 100644 --- a/cpukit/score/cpu/no_cpu/Makefile.am +++ b/cpukit/score/cpu/no_cpu/Makefile.am @@ -4,6 +4,7 @@ noinst_LIBRARIES = libscorecpu.a libscorecpu_a_SOURCES = cpu.c cpu_asm.c libscorecpu_a_SOURCES += cpucounterfrequency.c libscorecpu_a_SOURCES += cpucounterread.c +libscorecpu_a_SOURCES += cpuidle.c libscorecpu_a_CPPFLAGS = $(AM_CPPFLAGS) include $(top_srcdir)/automake/local.am diff --git a/cpukit/score/cpu/no_cpu/cpuidle.c b/cpukit/score/cpu/no_cpu/cpuidle.c new file mode 100644 index 0000000000..de66b39faa --- /dev/null +++ b/cpukit/score/cpu/no_cpu/cpuidle.c @@ -0,0 +1,28 @@ +/* + * Copyright (c) 2013-2014 embedded brains GmbH. All rights reserved. + * + * embedded brains GmbH + * Dornierstr. 4 + * 82178 Puchheim + * Germany + * + * + * The license and distribution terms for this file may be + * found in the file LICENSE in this distribution or at + * http://www.rtems.org/license/LICENSE. + */ + +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include + +void *_CPU_Thread_Idle_body( uintptr_t ignored ) +{ + while ( true ) { + /* Do nothing */ + } + + return NULL; +} diff --git a/cpukit/score/cpu/no_cpu/include/rtems/score/cpu.h b/cpukit/score/cpu/no_cpu/include/rtems/score/cpu.h index 427e381582..8e66182bba 100644 --- a/cpukit/score/cpu/no_cpu/include/rtems/score/cpu.h +++ b/cpukit/score/cpu/no_cpu/include/rtems/score/cpu.h @@ -197,32 +197,6 @@ extern "C" { */ #define CPU_ENABLE_ROBUST_THREAD_DISPATCH FALSE -/** - * Does this port provide a CPU dependent IDLE task implementation? - * - * If TRUE, then the routine @ref _CPU_Thread_Idle_body - * must be provided and is the default IDLE thread body instead of - * @ref _CPU_Thread_Idle_body. - * - * If FALSE, then use the generic IDLE thread body if the BSP does - * not provide one. - * - * This is intended to allow for supporting processors which have - * a low power or idle mode. When the IDLE thread is executed, then - * the CPU can be powered down. - * - * The order of precedence for selecting the IDLE thread body is: - * - * -# BSP provided - * -# CPU dependent (if provided) - * -# generic (if no BSP and no CPU dependent) - * - * Port Specific Information: - * - * XXX document implementation including references if appropriate - */ -#define CPU_PROVIDES_IDLE_THREAD_BODY TRUE - /** * Does the stack grow up (toward higher addresses) or down * (toward lower addresses)? @@ -1044,9 +1018,6 @@ void _CPU_ISR_install_vector( /** * This routine is the CPU dependent IDLE thread body. * - * NOTE: It need only be provided if @ref CPU_PROVIDES_IDLE_THREAD_BODY - * is TRUE. - * * Port Specific Information: * * XXX document implementation including references if appropriate -- cgit v1.2.3