summaryrefslogtreecommitdiff
path: root/cesar/hal/arch/inc/ecos.h
diff options
context:
space:
mode:
Diffstat (limited to 'cesar/hal/arch/inc/ecos.h')
-rw-r--r--cesar/hal/arch/inc/ecos.h50
1 files changed, 11 insertions, 39 deletions
diff --git a/cesar/hal/arch/inc/ecos.h b/cesar/hal/arch/inc/ecos.h
index bfb5a1254c..01bb119621 100644
--- a/cesar/hal/arch/inc/ecos.h
+++ b/cesar/hal/arch/inc/ecos.h
@@ -21,41 +21,19 @@
extern inline uint
arch_isr_lock (void)
{
-#ifdef __sparc__
- /* On SPARC, processor stops if traps are disabled. */
- uint lock;
- HAL_QUERY_TRAPS (lock);
-#else
- uint lock = 1;
-#endif
- if (lock)
- {
- uint flags;
- HAL_DISABLE_INTERRUPTS (flags);
- HAL_REORDER_BARRIER ();
- hal_trace_isr_locked (true);
- return flags;
- }
- else
- return 0;
+ uint flags;
+ HAL_DISABLE_INTERRUPTS (flags);
+ HAL_REORDER_BARRIER ();
+ hal_trace_isr_locked (true);
+ return flags;
}
extern inline void
arch_isr_unlock (uint flags)
{
-#ifdef __sparc__
- /* On SPARC, processor stops if traps are disabled. */
- uint unlock;
- HAL_QUERY_TRAPS (unlock);
-#else
- uint unlock = 1;
-#endif
- if (unlock)
- {
- hal_trace_isr_locked (false);
- HAL_RESTORE_INTERRUPTS (flags);
- HAL_REORDER_BARRIER ();
- }
+ hal_trace_isr_locked (false);
+ HAL_RESTORE_INTERRUPTS (flags);
+ HAL_REORDER_BARRIER ();
}
extern inline void
@@ -77,16 +55,10 @@ arch_dsr_unlock (void)
extern inline void
arch_stop (void)
{
-#ifdef __sparc__
- /* On SPARC, processor stops if traps are disabled. */
- uint et;
- HAL_QUERY_TRAPS (et);
- if (et)
- cyg_drv_isr_lock ();
-#else
- cyg_drv_isr_lock ();
-#endif
+ uint flags;
+ HAL_DISABLE_INTERRUPTS (flags);
cyg_drv_dsr_lock ();
+ HAL_REORDER_BARRIER ();
}
#define arch_reorder_barrier HAL_REORDER_BARRIER