summaryrefslogtreecommitdiffstats
path: root/uisimulator/sdl/thread-sdl.c
diff options
context:
space:
mode:
authorMichael Sevakis <jethead71@rockbox.org>2008-01-19 13:27:47 +0000
committerMichael Sevakis <jethead71@rockbox.org>2008-01-19 13:27:47 +0000
commit32a531b09bf05000048bb3e1cbc25556075e2334 (patch)
tree3f7ec134a2c2e23a9bf8d8f8755034947afdde66 /uisimulator/sdl/thread-sdl.c
parent2235c7e582f21789f4f881380a983cae1737bb37 (diff)
downloadrockbox-32a531b09bf05000048bb3e1cbc25556075e2334.tar.gz
rockbox-32a531b09bf05000048bb3e1cbc25556075e2334.tar.bz2
rockbox-32a531b09bf05000048bb3e1cbc25556075e2334.zip
Do some simplification in switch_thread regarding interrupt enabling which simplifies kernel objects as well. Simply doing unconditional disable/enable should be fine in the firmware. Not sure about the case in the bootloader for all targets and so will evaluate but that should be fine too if everything is masked.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@16107 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'uisimulator/sdl/thread-sdl.c')
-rw-r--r--uisimulator/sdl/thread-sdl.c13
1 files changed, 3 insertions, 10 deletions
diff --git a/uisimulator/sdl/thread-sdl.c b/uisimulator/sdl/thread-sdl.c
index b8297072f2..d1a8e60d01 100644
--- a/uisimulator/sdl/thread-sdl.c
+++ b/uisimulator/sdl/thread-sdl.c
@@ -135,8 +135,7 @@ bool thread_sdl_init(void *param)
running->name = "main";
running->state = STATE_RUNNING;
running->context.c = SDL_CreateCond();
- cores[CURRENT_CORE].irq_level = STAY_IRQ_LEVEL;
-
+
if (running->context.c == NULL)
{
fprintf(stderr, "Failed to create main condition variable\n");
@@ -230,15 +229,9 @@ static void remove_from_list_l(struct thread_entry **list,
thread->l.next->l.prev = thread->l.prev;
}
-static void run_blocking_ops(void)
+static inline void run_blocking_ops(void)
{
- int level = cores[CURRENT_CORE].irq_level;
-
- if (level != STAY_IRQ_LEVEL)
- {
- cores[CURRENT_CORE].irq_level = STAY_IRQ_LEVEL;
- set_irq_level(level);
- }
+ set_irq_level(0);
}
struct thread_entry *thread_get_current(void)