diff options
Diffstat (limited to 'apps/plugins')
-rw-r--r-- | apps/plugins/alpine_cdc.c | 5 | ||||
-rw-r--r-- | apps/plugins/battery_bench.c | 7 |
2 files changed, 7 insertions, 5 deletions
diff --git a/apps/plugins/alpine_cdc.c b/apps/plugins/alpine_cdc.c index a482664d6a..134bb3dee6 100644 --- a/apps/plugins/alpine_cdc.c +++ b/apps/plugins/alpine_cdc.c | |||
@@ -202,7 +202,7 @@ struct | |||
202 | /* communication to the worker thread */ | 202 | /* communication to the worker thread */ |
203 | struct | 203 | struct |
204 | { | 204 | { |
205 | int id; /* ID of the thread */ | 205 | struct thread_entry *id; /* Pointer of the thread */ |
206 | bool foreground; /* set as long as we're owning the UI */ | 206 | bool foreground; /* set as long as we're owning the UI */ |
207 | bool exiting; /* signal to the thread that we want to exit */ | 207 | bool exiting; /* signal to the thread that we want to exit */ |
208 | bool ended; /* response from the thread, that is has exited */ | 208 | bool ended; /* response from the thread, that is has exited */ |
@@ -1169,7 +1169,8 @@ int main(void* parameter) | |||
1169 | 1169 | ||
1170 | rb->memset(&gTread, 0, sizeof(gTread)); | 1170 | rb->memset(&gTread, 0, sizeof(gTread)); |
1171 | gTread.foreground = true; | 1171 | gTread.foreground = true; |
1172 | gTread.id = rb->create_thread(thread, stack, stacksize, "CDC"); | 1172 | gTread.id = rb->create_thread(thread, stack, stacksize, "CDC" |
1173 | IF_PRIO(, PRIORITY_BACKGROUND)); | ||
1173 | 1174 | ||
1174 | #ifdef DEBUG | 1175 | #ifdef DEBUG |
1175 | do | 1176 | do |
diff --git a/apps/plugins/battery_bench.c b/apps/plugins/battery_bench.c index 9400bd2018..3c56f84309 100644 --- a/apps/plugins/battery_bench.c +++ b/apps/plugins/battery_bench.c | |||
@@ -102,7 +102,7 @@ enum plugin_status plugin_start(struct plugin_api* api, void* parameter) | |||
102 | 102 | ||
103 | struct | 103 | struct |
104 | { | 104 | { |
105 | int id; | 105 | struct thread_entry *id; |
106 | bool ended; | 106 | bool ended; |
107 | } s_thread; | 107 | } s_thread; |
108 | 108 | ||
@@ -454,10 +454,11 @@ int main(void) | |||
454 | rb->close(fd); | 454 | rb->close(fd); |
455 | } | 455 | } |
456 | 456 | ||
457 | rb->queue_init(&thread_q); /* put the thread's queue in the bcast list */ | 457 | rb->queue_init(&thread_q, true); /* put the thread's queue in the bcast list */ |
458 | rb->memset(&s_thread, 0, sizeof(s_thread)); /* zero the struct */ | 458 | rb->memset(&s_thread, 0, sizeof(s_thread)); /* zero the struct */ |
459 | if((s_thread.id = rb->create_thread(thread, thread_stack, | 459 | if((s_thread.id = rb->create_thread(thread, thread_stack, |
460 | sizeof(thread_stack), "Battery Benchmark"))<0) | 460 | sizeof(thread_stack), "Battery Benchmark" |
461 | IF_PRIO(, PRIORITY_BACKGROUND))) == NULL) | ||
461 | { | 462 | { |
462 | rb->splash(HZ,true,"Cannot create thread!"); | 463 | rb->splash(HZ,true,"Cannot create thread!"); |
463 | return PLUGIN_ERROR; | 464 | return PLUGIN_ERROR; |