From 47d88b705f6b1d93607c28975df6f4e1a12260c8 Mon Sep 17 00:00:00 2001 From: Joel Sherrill Date: Wed, 12 Sep 2007 15:16:16 +0000 Subject: 2007-09-12 Joel Sherrill PR 1257/bsps * startup/bspclean.c: Code outside of cpukit should use the public API for rtems_interrupt_disable/rtems_interrupt_enable. By bypassing the public API and directly accessing _CPU_ISR_Disable and _CPU_ISR_Enable, they were bypassing the compiler memory barrier directive which could lead to problems. This patch also changes the type of the variable passed into these routines and addresses minor style issues. --- c/src/lib/libbsp/nios2/nios2_iss/ChangeLog | 11 +++++++++++ c/src/lib/libbsp/nios2/nios2_iss/startup/bspclean.c | 4 ++-- 2 files changed, 13 insertions(+), 2 deletions(-) (limited to 'c') diff --git a/c/src/lib/libbsp/nios2/nios2_iss/ChangeLog b/c/src/lib/libbsp/nios2/nios2_iss/ChangeLog index 522f75ec24..2cf76f0c92 100644 --- a/c/src/lib/libbsp/nios2/nios2_iss/ChangeLog +++ b/c/src/lib/libbsp/nios2/nios2_iss/ChangeLog @@ -1,3 +1,14 @@ +2007-09-12 Joel Sherrill + + PR 1257/bsps + * startup/bspclean.c: Code outside of cpukit should use the public API + for rtems_interrupt_disable/rtems_interrupt_enable. By bypassing the + public API and directly accessing _CPU_ISR_Disable and + _CPU_ISR_Enable, they were bypassing the compiler memory barrier + directive which could lead to problems. This patch also changes the + type of the variable passed into these routines and addresses minor + style issues. + 2007-04-12 Ralf Corsépius * bsp_specs: Remove qrtems_debug. diff --git a/c/src/lib/libbsp/nios2/nios2_iss/startup/bspclean.c b/c/src/lib/libbsp/nios2/nios2_iss/startup/bspclean.c index b38f0e1d57..7d264f8505 100644 --- a/c/src/lib/libbsp/nios2/nios2_iss/startup/bspclean.c +++ b/c/src/lib/libbsp/nios2/nios2_iss/startup/bspclean.c @@ -25,7 +25,7 @@ void bsp_cleanup( void ) { - int level; - _CPU_ISR_Disable(level); + rtems_interrupt_level level; + rtems_interrupt_disable(level); for(;;); } -- cgit v1.2.3