diff options
Diffstat (limited to 'uisimulator/sdl/thread-sdl.c')
-rw-r--r-- | uisimulator/sdl/thread-sdl.c | 13 |
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) | |||
135 | running->name = "main"; | 135 | running->name = "main"; |
136 | running->state = STATE_RUNNING; | 136 | running->state = STATE_RUNNING; |
137 | running->context.c = SDL_CreateCond(); | 137 | running->context.c = SDL_CreateCond(); |
138 | cores[CURRENT_CORE].irq_level = STAY_IRQ_LEVEL; | 138 | |
139 | |||
140 | if (running->context.c == NULL) | 139 | if (running->context.c == NULL) |
141 | { | 140 | { |
142 | fprintf(stderr, "Failed to create main condition variable\n"); | 141 | fprintf(stderr, "Failed to create main condition variable\n"); |
@@ -230,15 +229,9 @@ static void remove_from_list_l(struct thread_entry **list, | |||
230 | thread->l.next->l.prev = thread->l.prev; | 229 | thread->l.next->l.prev = thread->l.prev; |
231 | } | 230 | } |
232 | 231 | ||
233 | static void run_blocking_ops(void) | 232 | static inline void run_blocking_ops(void) |
234 | { | 233 | { |
235 | int level = cores[CURRENT_CORE].irq_level; | 234 | set_irq_level(0); |
236 | |||
237 | if (level != STAY_IRQ_LEVEL) | ||
238 | { | ||
239 | cores[CURRENT_CORE].irq_level = STAY_IRQ_LEVEL; | ||
240 | set_irq_level(level); | ||
241 | } | ||
242 | } | 235 | } |
243 | 236 | ||
244 | struct thread_entry *thread_get_current(void) | 237 | struct thread_entry *thread_get_current(void) |