Make sure dircache blocks correctly.

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@10573 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
Miika Pekkarinen 2006-08-14 19:03:37 +00:00
parent 7e84db7fa2
commit 5019b32620
2 changed files with 9 additions and 2 deletions

View file

@ -997,8 +997,10 @@ bool insert_all_playlist(struct tree_context *c, int position, bool queue)
}
if (playlist_insert_track(NULL, buf, position, queue, false) < 0)
{
logf("playlist_insert_track failed");
break;
}
yield();
}
playlist_sync(NULL);
@ -1065,7 +1067,8 @@ bool tagtree_insert_selection_playlist(int position, bool queue)
else
{
logf("insert_all_playlist");
insert_all_playlist(tc, position, queue);
if (!insert_all_playlist(tc, position, queue))
gui_syncsplash(HZ*2, true, str(LANG_FAILED));
}
/* Finally return the dirlevel to its original value. */

View file

@ -633,6 +633,7 @@ int dircache_build(int last_size)
if (dircache_size > 0)
{
thread_enabled = true;
dircache_initializing = true;
queue_post(&dircache_queue, DIRCACHE_BUILD, 0);
return 2;
}
@ -680,6 +681,7 @@ void dircache_init(void)
int i;
dircache_initialized = false;
dircache_initializing = false;
memset(opendirs, 0, sizeof(opendirs));
for (i = 0; i < MAX_OPEN_DIRS; i++)
@ -769,7 +771,9 @@ void dircache_disable(void)
}
}
} while (cache_in_use) ;
logf("Cache released");
entry_count = 0;
}
/**