summaryrefslogtreecommitdiff
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
parent4cee740afa540ce26babb92d26cbb5b524cc245a (diff)
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
-rw-r--r--firmware/export/system.h4
-rw-r--r--firmware/system.c2
-rw-r--r--uisimulator/win32/kernel.c2
3 files changed, 4 insertions, 4 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));
diff --git a/uisimulator/win32/kernel.c b/uisimulator/win32/kernel.c
index 466950eba0..9c82435df2 100644
--- a/uisimulator/win32/kernel.c
+++ b/uisimulator/win32/kernel.c
@@ -86,7 +86,7 @@ void queue_post(struct event_queue *q, int id, void *data)
int wr;
int oldlevel;
- oldlevel = set_irq_level(15);
+ oldlevel = set_irq_level(HIGHEST_IRQ_LEVEL);
wr = (q->write++) & QUEUE_LENGTH_MASK;
q->events[wr].id = id;