summaryrefslogtreecommitdiff
path: root/firmware/target/hosted/sdl/thread-sdl.c
diff options
context:
space:
mode:
Diffstat (limited to 'firmware/target/hosted/sdl/thread-sdl.c')
-rw-r--r--firmware/target/hosted/sdl/thread-sdl.c10
1 files changed, 2 insertions, 8 deletions
diff --git a/firmware/target/hosted/sdl/thread-sdl.c b/firmware/target/hosted/sdl/thread-sdl.c
index eaf59e245d..e117a4e3b6 100644
--- a/firmware/target/hosted/sdl/thread-sdl.c
+++ b/firmware/target/hosted/sdl/thread-sdl.c
@@ -439,11 +439,9 @@ unsigned int wakeup_thread_(struct thread_entry **list)
439 return THREAD_NONE; 439 return THREAD_NONE;
440} 440}
441 441
442unsigned int thread_queue_wake(struct thread_entry **list, 442unsigned int thread_queue_wake(struct thread_entry **list)
443 volatile int *count)
444{ 443{
445 unsigned int result = THREAD_NONE; 444 unsigned int result = THREAD_NONE;
446 int num = 0;
447 445
448 for (;;) 446 for (;;)
449 { 447 {
@@ -453,12 +451,8 @@ unsigned int thread_queue_wake(struct thread_entry **list,
453 break; 451 break;
454 452
455 result |= rc; 453 result |= rc;
456 num++;
457 } 454 }
458 455
459 if (count)
460 *count = num;
461
462 return result; 456 return result;
463} 457}
464 458
@@ -621,7 +615,7 @@ void remove_thread(unsigned int thread_id)
621 615
622 new_thread_id(thread->id, thread); 616 new_thread_id(thread->id, thread);
623 thread->state = STATE_KILLED; 617 thread->state = STATE_KILLED;
624 thread_queue_wake(&thread->queue, NULL); 618 thread_queue_wake(&thread->queue);
625 619
626 SDL_DestroySemaphore(s); 620 SDL_DestroySemaphore(s);
627 621