summaryrefslogtreecommitdiff
path: root/apps/hosted/yesno.c
diff options
context:
space:
mode:
authorJonathan Gordon <rockbox@jdgordon.info>2011-03-02 10:13:56 +0000
committerJonathan Gordon <rockbox@jdgordon.info>2011-03-02 10:13:56 +0000
commit86a0022a160af0295ca97c475fb6d4c3c999ff8a (patch)
tree3d44a07a34ac95e4d78945f0069cdaafe4c90c42 /apps/hosted/yesno.c
parentd233066155ab1b6fff26f4b4c8faa9507f0eca84 (diff)
downloadrockbox-86a0022a160af0295ca97c475fb6d4c3c999ff8a.tar.gz
rockbox-86a0022a160af0295ca97c475fb6d4c3c999ff8a.zip
Make android compile (untested)
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29496 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/hosted/yesno.c')
-rw-r--r--apps/hosted/yesno.c8
1 files changed, 4 insertions, 4 deletions
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;
33static jclass RockboxYesno_class = NULL; 33static jclass RockboxYesno_class = NULL;
34static jobject RockboxYesno_instance = NULL; 34static jobject RockboxYesno_instance = NULL;
35static jmethodID yesno_func; 35static jmethodID yesno_func;
36static struct wakeup yesno_wakeup; 36static struct semaphore yesno_done;
37static bool ret; 37static bool ret;
38 38
39JNIEXPORT void JNICALL 39JNIEXPORT void JNICALL
@@ -42,7 +42,7 @@ Java_org_rockbox_RockboxYesno_put_1result(JNIEnv *env, jobject this, jboolean re
42 (void)env; 42 (void)env;
43 (void)this; 43 (void)this;
44 ret = (bool)result; 44 ret = (bool)result;
45 wakeup_signal(&yesno_wakeup); 45 semaphore_release(&yesno_done);
46} 46}
47 47
48static void yesno_init(void) 48static void yesno_init(void)
@@ -51,7 +51,7 @@ static void yesno_init(void)
51 static jmethodID yesno_is_usable; 51 static jmethodID yesno_is_usable;
52 if (RockboxYesno_class == NULL) 52 if (RockboxYesno_class == NULL)
53 { 53 {
54 wakeup_init(&yesno_wakeup); 54 semaphore_init(&yesno_done, 1, 0);
55 /* get the class and its constructor */ 55 /* get the class and its constructor */
56 RockboxYesno_class = e->FindClass(env_ptr, 56 RockboxYesno_class = e->FindClass(env_ptr,
57 "org/rockbox/RockboxYesno"); 57 "org/rockbox/RockboxYesno");
@@ -109,7 +109,7 @@ enum yesno_res gui_syncyesno_run(const struct text_message * main_message,
109 e->CallVoidMethod(env_ptr, RockboxYesno_instance, yesno_func, 109 e->CallVoidMethod(env_ptr, RockboxYesno_instance, yesno_func,
110 message, yes, no); 110 message, yes, no);
111 111
112 wakeup_wait(&yesno_wakeup, TIMEOUT_BLOCK); 112 semaphore_wait(&yesno_done, TIMEOUT_BLOCK);
113 113
114 e->DeleteLocalRef(env_ptr, message); 114 e->DeleteLocalRef(env_ptr, message);
115 e->DeleteLocalRef(env_ptr, yes); 115 e->DeleteLocalRef(env_ptr, yes);