summaryrefslogtreecommitdiffstats
path: root/firmware
diff options
context:
space:
mode:
authorJörg Hohensohn <hohensoh@rockbox.org>2004-03-13 16:45:18 +0000
committerJörg Hohensohn <hohensoh@rockbox.org>2004-03-13 16:45:18 +0000
commit81e309dd1a768c2fcf2cc9e6acd16dc01f9ce360 (patch)
treef86855227f2ab1f4963c215128df21effeb7dfbb /firmware
parent4cee740afa540ce26babb92d26cbb5b524cc245a (diff)
downloadrockbox-81e309dd1a768c2fcf2cc9e6acd16dc01f9ce360.tar.gz
rockbox-81e309dd1a768c2fcf2cc9e6acd16dc01f9ce360.tar.bz2
rockbox-81e309dd1a768c2fcf2cc9e6acd16dc01f9ce360.zip
We had a few set_irq_level(15) left in the code, instead of the new set_irq_level(HIGHEST_IRQ_LEVEL). Only one was really used, in system_reboot(), creating a (unlikely) race condition.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@4374 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'firmware')
-rw-r--r--firmware/export/system.h4
-rw-r--r--firmware/system.c2
2 files changed, 3 insertions, 3 deletions
diff --git a/firmware/export/system.h b/firmware/export/system.h
index 038d9567e0..cfb771d66b 100644
--- a/firmware/export/system.h
+++ b/firmware/export/system.h
@@ -133,7 +133,7 @@ static inline int tas (volatile int *pointer)
/* Compare And Swap */
static inline int cas (volatile int *pointer,int requested_value,int new_value)
{
- unsigned int oldlevel = set_irq_level(15);
+ unsigned int oldlevel = set_irq_level(HIGHEST_IRQ_LEVEL);
if (*pointer == requested_value)
{
*pointer = new_value;
@@ -146,7 +146,7 @@ static inline int cas (volatile int *pointer,int requested_value,int new_value)
static inline int cas2 (volatile int *pointer1,volatile int *pointer2,int requested_value1,int requested_value2,int new_value1,int new_value2)
{
- unsigned int oldlevel = set_irq_level(15);
+ unsigned int oldlevel = set_irq_level(HIGHEST_IRQ_LEVEL);
if (*pointer1 == requested_value1 && *pointer2 == requested_value2)
{
*pointer1 = new_value1;
diff --git a/firmware/system.c b/firmware/system.c
index cd2c5e34a0..41358a6776 100644
--- a/firmware/system.c
+++ b/firmware/system.c
@@ -302,7 +302,7 @@ void (*vbr[]) (void) __attribute__ ((section (".vectors"))) =
void system_reboot (void)
{
- set_irq_level(15);
+ set_irq_level(HIGHEST_IRQ_LEVEL);
asm volatile ("ldc\t%0,vbr" : : "r"(0));