diff packages/hal/arm/arch/current/include/hal_arch.h @ 1073:d5ff69833fad

* include/hal_arch.h: Include plf_arch.h or var_arch.h if platform or variant requires it to do overrides. (HAL_IDLE_THREAD_ACTION): Default to empty statement but allow to be overridden. * src/hal_misc.c: Remove hal_idle_thread_action. It's no use.
author jlarmour
date Tue, 24 Jun 2003 08:43:00 +0000
parents 609c8b1447ee
children
line wrap: on
line diff
--- a/packages/hal/arm/arch/current/include/hal_arch.h
+++ b/packages/hal/arm/arch/current/include/hal_arch.h
@@ -57,6 +57,14 @@
 #include <pkgconf/hal.h>         // To decide on stack usage
 #include <cyg/infra/cyg_type.h>
 
+#ifdef CYGBLD_HAL_ARM_PLF_ARCH_H
+#include <cyg/hal/plf_arch.h>
+#endif
+
+#ifdef CYGBLD_HAL_ARM_VAR_ARCH_H
+#include <cyg/hal/var_arch.h>
+#endif
+
 //
 // CPSR Register defines
 //
@@ -330,11 +338,12 @@ externC void hal_longjmp(hal_jmp_buf env
 // Idle thread code.
 // This macro is called in the idle thread loop, and gives the HAL the
 // chance to insert code. Typical idle thread behaviour might be to halt the
-// processor.
+// processor. Here we only supply a default fallback if the variant/platform
+// doesn't define anything.
 
-externC void hal_idle_thread_action(cyg_uint32 loop_count);
-
-#define HAL_IDLE_THREAD_ACTION(_count_) hal_idle_thread_action(_count_)
+#ifndef HAL_IDLE_THREAD_ACTION
+#define HAL_IDLE_THREAD_ACTION(_count_) CYG_EMPTY_STATEMENT
+#endif
 
 //---------------------------------------------------------------------------