summaryrefslogtreecommitdiff
path: root/firmware/target/hosted/sdl
diff options
context:
space:
mode:
authorMichael Sevakis <jethead71@rockbox.org>2014-08-06 02:10:14 -0400
committerMichael Sevakis <jethead71@rockbox.org>2014-08-06 02:27:49 -0400
commit81ffd9bfeee6aca65f507a46c8123b47ca6e2803 (patch)
treee9eb535dbc71f35bce7519d7a6a063e4a683ba55 /firmware/target/hosted/sdl
parente7e302f2559ec2c8878e5b5205755900215196b3 (diff)
downloadrockbox-81ffd9bfeee6aca65f507a46c8123b47ca6e2803.tar.gz
rockbox-81ffd9bfeee6aca65f507a46c8123b47ca6e2803.zip
Fix some stuff for no priority and
thread_queue_wake() doesn't need the 2nd parameter. The original purpose for it never came to be. Non priority version mrsw_writer_wakeup_readers was left improperly finished. Get that back into line. Change-Id: Ic613a2479f3cc14dc7c761517670eb15178da9f5
Diffstat (limited to 'firmware/target/hosted/sdl')
-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