From effceea22915a087c1c85ff30d2e62110413edaf Mon Sep 17 00:00:00 2001 From: Michael Sevakis Date: Thu, 23 Oct 2008 13:13:00 +0000 Subject: Remove the event object in the kernel since it's rather extraneous at the moment. This makes the codecs and the plugins incompatible, so update fully. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@18867 a1c6a512-1295-4272-9138-f99709370657 --- apps/codecs/spc.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'apps/codecs/spc.c') diff --git a/apps/codecs/spc.c b/apps/codecs/spc.c index da91eb0391..a2b6fabf99 100644 --- a/apps/codecs/spc.c +++ b/apps/codecs/spc.c @@ -230,7 +230,7 @@ static struct int head, tail; struct semaphore emu_sem_head; struct semaphore emu_sem_tail; - struct event emu_evt_reply; + struct semaphore emu_evt_reply; intptr_t retval; struct sample_queue_chunk wav_chunk[WAV_NUM_CHUNKS]; } sample_queue SHAREDBSS_ATTR; @@ -284,7 +284,7 @@ static intptr_t emu_thread_send_msg(long id, intptr_t data) if (id != SPC_EMU_QUIT) { /* Wait for a response */ - ci->event_wait(&sample_queue.emu_evt_reply, STATE_SIGNALED); + ci->semaphore_wait(&sample_queue.emu_evt_reply); } return sample_queue.retval; @@ -316,7 +316,7 @@ static bool emu_thread_process_msg(struct sample_queue_chunk *chunk) } if (id != SPC_EMU_QUIT) { - ci->event_set_state(&sample_queue.emu_evt_reply, STATE_SIGNALED); + ci->semaphore_release(&sample_queue.emu_evt_reply); } return ret; @@ -361,8 +361,7 @@ static bool spc_emu_start(void) /* Initialize audio queue as full to prevent emu thread from trying to run the emulator before loading something */ - ci->event_init(&sample_queue.emu_evt_reply, - EVENT_AUTOMATIC | STATE_NONSIGNALED); + ci->semaphore_init(&sample_queue.emu_evt_reply, 1, 0); ci->semaphore_init(&sample_queue.emu_sem_tail, 2, 0); ci->semaphore_init(&sample_queue.emu_sem_head, 2, 2); sample_queue.head = 0; -- cgit v1.2.3