core: Add a field to initdata for enabling async idle tasks

I'll use this when testing gui album art to enable fetching the artwork.

Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
This commit is contained in:
Anna Schumaker 2016-09-06 08:15:26 -04:00
parent d373c55320
commit 7fbef057bf
2 changed files with 7 additions and 3 deletions

View File

@ -21,10 +21,11 @@ static bool core_defragment(void *data)
void core_init(int *argc, char ***argv, struct core_init_data *init) void core_init(int *argc, char ***argv, struct core_init_data *init)
{ {
#ifdef CONFIG_TESTING #ifdef CONFIG_TESTING
idle_init_sync(); if (init->idle_async == false)
#else idle_init_sync();
idle_init(); else
#endif /* CONFIG_TESTING */ #endif /* CONFIG_TESTING */
idle_init();
settings_init(); settings_init();
tags_init(); tags_init();
playlist_init(init->playlist_ops); playlist_init(init->playlist_ops);

View File

@ -9,6 +9,9 @@
struct core_init_data { struct core_init_data {
struct queue_ops *playlist_ops; struct queue_ops *playlist_ops;
struct audio_ops *audio_ops; struct audio_ops *audio_ops;
#ifdef CONFIG_TESTING
bool idle_async;
#endif /* CONFIG_TESTING */
}; };