summaryrefslogtreecommitdiff
path: root/apps/plugin.c
diff options
context:
space:
mode:
authorMiika Pekkarinen <miipekk@ihme.org>2006-09-16 16:18:11 +0000
committerMiika Pekkarinen <miipekk@ihme.org>2006-09-16 16:18:11 +0000
commita85044bf9eaa0a7206c1978d3cfd57ab2d7fae2f (patch)
treea30695ed540bf32365d577f46398f712c7a494c4 /apps/plugin.c
parentbaf5494341cdd6cdb9590e21d429920b9bc4a2c6 (diff)
downloadrockbox-a85044bf9eaa0a7206c1978d3cfd57ab2d7fae2f.tar.gz
rockbox-a85044bf9eaa0a7206c1978d3cfd57ab2d7fae2f.zip
New scheduler, with priorities for swcodec platforms. Frequent task
switching should be more efficient and tasks are stored in linked lists to eliminate unnecessary task switching to improve performance. Audio should no longer skip on swcodec targets caused by too CPU hungry UI thread or background threads. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@10958 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/plugin.c')
-rw-r--r--apps/plugin.c129
1 files changed, 61 insertions, 68 deletions
diff --git a/apps/plugin.c b/apps/plugin.c
index 6e2a8bca37..9ffb980300 100644
--- a/apps/plugin.c
+++ b/apps/plugin.c
@@ -108,6 +108,7 @@ static const struct plugin_api rockbox_api = {
108 PREFIX(lcd_icon), 108 PREFIX(lcd_icon),
109 lcd_double_height, 109 lcd_double_height,
110#else 110#else
111 lcd_setmargins,
111 lcd_set_drawmode, 112 lcd_set_drawmode,
112 lcd_get_drawmode, 113 lcd_get_drawmode,
113 lcd_setfont, 114 lcd_setfont,
@@ -132,6 +133,9 @@ static const struct plugin_api rockbox_api = {
132 lcd_bitmap_transparent_part, 133 lcd_bitmap_transparent_part,
133 lcd_bitmap_transparent, 134 lcd_bitmap_transparent,
134#endif 135#endif
136 bidi_l2v,
137 font_get_bits,
138 font_load,
135 lcd_putsxy, 139 lcd_putsxy,
136 lcd_puts_style, 140 lcd_puts_style,
137 lcd_puts_scroll_style, 141 lcd_puts_scroll_style,
@@ -178,6 +182,45 @@ static const struct plugin_api rockbox_api = {
178 remote_backlight_on, 182 remote_backlight_on,
179 remote_backlight_off, 183 remote_backlight_off,
180#endif 184#endif
185#if NB_SCREENS == 2
186 {&screens[SCREEN_MAIN], &screens[SCREEN_REMOTE]},
187#else
188 {&screens[SCREEN_MAIN]},
189#endif
190#if defined(HAVE_REMOTE_LCD) && (LCD_REMOTE_DEPTH > 1)
191 lcd_remote_set_foreground,
192 lcd_remote_get_foreground,
193 lcd_remote_set_background,
194 lcd_remote_get_background,
195 lcd_remote_bitmap_part,
196 lcd_remote_bitmap,
197#endif
198
199#if defined(HAVE_LCD_COLOR) && !defined(SIMULATOR)
200 lcd_yuv_blit,
201#endif
202 /* list */
203 gui_synclist_init,
204 gui_synclist_set_nb_items,
205 gui_synclist_set_icon_callback,
206 gui_synclist_get_nb_items,
207 gui_synclist_get_sel_pos,
208 gui_synclist_draw,
209 gui_synclist_select_item,
210 gui_synclist_select_next,
211 gui_synclist_select_previous,
212 gui_synclist_select_next_page,
213 gui_synclist_select_previous_page,
214 gui_synclist_add_item,
215 gui_synclist_del_item,
216 gui_synclist_limit_scroll,
217 gui_synclist_flash,
218#ifdef HAVE_LCD_BITMAP
219 gui_synclist_scroll_right,
220 gui_synclist_scroll_left,
221#endif
222 gui_synclist_do_button,
223
181 /* button */ 224 /* button */
182 button_get, 225 button_get,
183 button_get_w_tmo, 226 button_get_w_tmo,
@@ -205,12 +248,14 @@ static const struct plugin_api rockbox_api = {
205 ata_sleep, 248 ata_sleep,
206 ata_disk_is_active, 249 ata_disk_is_active,
207#endif 250#endif
251 reload_directory,
208 252
209 /* dir */ 253 /* dir */
210 PREFIX(opendir), 254 PREFIX(opendir),
211 PREFIX(closedir), 255 PREFIX(closedir),
212 PREFIX(readdir), 256 PREFIX(readdir),
213 PREFIX(mkdir), 257 PREFIX(mkdir),
258 PREFIX(rmdir),
214 259
215 /* kernel/ system */ 260 /* kernel/ system */
216 PREFIX(sleep), 261 PREFIX(sleep),
@@ -253,6 +298,7 @@ static const struct plugin_api rockbox_api = {
253 298
254 /* strings and memory */ 299 /* strings and memory */
255 snprintf, 300 snprintf,
301 vsnprintf,
256 strcpy, 302 strcpy,
257 strncpy, 303 strncpy,
258 strlen, 304 strlen,
@@ -268,6 +314,7 @@ static const struct plugin_api rockbox_api = {
268 atoi, 314 atoi,
269 strchr, 315 strchr,
270 strcat, 316 strcat,
317 memchr,
271 memcmp, 318 memcmp,
272 strcasestr, 319 strcasestr,
273 /* unicode stuff */ 320 /* unicode stuff */
@@ -277,9 +324,12 @@ static const struct plugin_api rockbox_api = {
277 utf16BEdecode, 324 utf16BEdecode,
278 utf8encode, 325 utf8encode,
279 utf8length, 326 utf8length,
327 utf8seek,
280 328
281 /* sound */ 329 /* sound */
282 sound_set, 330 sound_set,
331 set_sound,
332
283 sound_min, 333 sound_min,
284 sound_max, 334 sound_max,
285#ifndef SIMULATOR 335#ifndef SIMULATOR
@@ -334,6 +384,9 @@ static const struct plugin_api rockbox_api = {
334#if (CONFIG_CODEC == MAS3587F) || (CONFIG_CODEC == MAS3539F) 384#if (CONFIG_CODEC == MAS3587F) || (CONFIG_CODEC == MAS3539F)
335 mas_codec_writereg, 385 mas_codec_writereg,
336 mas_codec_readreg, 386 mas_codec_readreg,
387 i2c_begin,
388 i2c_end,
389 i2c_write,
337#endif 390#endif
338#endif /* !SIMULATOR && CONFIG_CODEC != SWCODEC */ 391#endif /* !SIMULATOR && CONFIG_CODEC != SWCODEC */
339 392
@@ -352,7 +405,15 @@ static const struct plugin_api rockbox_api = {
352 menu_insert, 405 menu_insert,
353 menu_set_cursor, 406 menu_set_cursor,
354 set_option, 407 set_option,
408 set_int,
409 set_bool,
355 410
411 /* action handling */
412 get_custom_action,
413 get_action,
414 action_signalscreenchange,
415 action_userabort,
416
356 /* power */ 417 /* power */
357 battery_level, 418 battery_level,
358 battery_level_safe, 419 battery_level_safe,
@@ -405,74 +466,6 @@ static const struct plugin_api rockbox_api = {
405 466
406 /* new stuff at the end, sort into place next time 467 /* new stuff at the end, sort into place next time
407 the API gets incompatible */ 468 the API gets incompatible */
408 set_sound,
409#if ((CONFIG_CODEC == MAS3587F) || (CONFIG_CODEC == MAS3539F)) && !defined(SIMULATOR)
410 i2c_begin,
411 i2c_end,
412 i2c_write,
413#endif
414
415 vsnprintf,
416 memchr,
417 /* list */
418 gui_synclist_init,
419 gui_synclist_set_nb_items,
420 gui_synclist_set_icon_callback,
421 gui_synclist_get_nb_items,
422 gui_synclist_get_sel_pos,
423 gui_synclist_draw,
424 gui_synclist_select_item,
425 gui_synclist_select_next,
426 gui_synclist_select_previous,
427 gui_synclist_select_next_page,
428 gui_synclist_select_previous_page,
429 gui_synclist_add_item,
430 gui_synclist_del_item,
431 gui_synclist_limit_scroll,
432 gui_synclist_flash,
433#ifdef HAVE_LCD_BITMAP
434 gui_synclist_scroll_right,
435 gui_synclist_scroll_left,
436#endif
437 gui_synclist_do_button,
438
439#ifdef HAVE_LCD_BITMAP
440 lcd_setmargins,
441#endif
442 utf8seek,
443
444 set_int,
445 reload_directory,
446 set_bool,
447#if NB_SCREENS == 2
448 {&screens[SCREEN_MAIN], &screens[SCREEN_REMOTE]},
449#else
450 {&screens[SCREEN_MAIN]},
451#endif
452#ifdef HAVE_LCD_BITMAP
453 bidi_l2v,
454 font_get_bits,
455 font_load,
456#endif
457#if defined(HAVE_REMOTE_LCD) && (LCD_REMOTE_DEPTH > 1)
458 lcd_remote_set_foreground,
459 lcd_remote_get_foreground,
460 lcd_remote_set_background,
461 lcd_remote_get_background,
462 lcd_remote_bitmap_part,
463 lcd_remote_bitmap,
464#endif
465
466#if defined(HAVE_LCD_COLOR) && !defined(SIMULATOR)
467 lcd_yuv_blit,
468#endif
469
470 PREFIX(rmdir),
471 /* action handling */
472 get_custom_action,
473 get_action,
474 action_signalscreenchange,
475 action_userabort,
476}; 469};
477 470
478int plugin_load(const char* plugin, void* parameter) 471int plugin_load(const char* plugin, void* parameter)