From 86a0022a160af0295ca97c475fb6d4c3c999ff8a Mon Sep 17 00:00:00 2001 From: Jonathan Gordon Date: Wed, 2 Mar 2011 10:13:56 +0000 Subject: Make android compile (untested) git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29496 a1c6a512-1295-4272-9138-f99709370657 --- apps/hosted/yesno.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'apps/hosted/yesno.c') diff --git a/apps/hosted/yesno.c b/apps/hosted/yesno.c index d00cb063af..a1de64e3f9 100644 --- a/apps/hosted/yesno.c +++ b/apps/hosted/yesno.c @@ -33,7 +33,7 @@ extern JNIEnv *env_ptr; static jclass RockboxYesno_class = NULL; static jobject RockboxYesno_instance = NULL; static jmethodID yesno_func; -static struct wakeup yesno_wakeup; +static struct semaphore yesno_done; static bool ret; JNIEXPORT void JNICALL @@ -42,7 +42,7 @@ Java_org_rockbox_RockboxYesno_put_1result(JNIEnv *env, jobject this, jboolean re (void)env; (void)this; ret = (bool)result; - wakeup_signal(&yesno_wakeup); + semaphore_release(&yesno_done); } static void yesno_init(void) @@ -51,7 +51,7 @@ static void yesno_init(void) static jmethodID yesno_is_usable; if (RockboxYesno_class == NULL) { - wakeup_init(&yesno_wakeup); + semaphore_init(&yesno_done, 1, 0); /* get the class and its constructor */ RockboxYesno_class = e->FindClass(env_ptr, "org/rockbox/RockboxYesno"); @@ -109,7 +109,7 @@ enum yesno_res gui_syncyesno_run(const struct text_message * main_message, e->CallVoidMethod(env_ptr, RockboxYesno_instance, yesno_func, message, yes, no); - wakeup_wait(&yesno_wakeup, TIMEOUT_BLOCK); + semaphore_wait(&yesno_done, TIMEOUT_BLOCK); e->DeleteLocalRef(env_ptr, message); e->DeleteLocalRef(env_ptr, yes); -- cgit v1.2.3