From 7d8c9cc7e31e15b93af7c08f7d03ed8ca10f5454 Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Tue, 7 Oct 2008 22:11:16 +0200 Subject: directory: serialize song deletes from playlist during update This makes the update code thread-safe and doesn't penalize the playlist code by complicating it with complicated and error-prone locks (and the associated overhead, not everybody has a thread-implementation as good as NPTL). The update task blocks during the delete; but the update task is a slow task anyways so we can block w/o people caring too much. This was also our only freeSong call site, so remove that function. Note that deleting entire directories is not fully thread-safe, yet; as their traversals are not yet locked. --- src/song.c | 6 ------ 1 file changed, 6 deletions(-) (limited to 'src/song.c') diff --git a/src/song.c b/src/song.c index acc19eb0e..f125cf2df 100644 --- a/src/song.c +++ b/src/song.c @@ -79,12 +79,6 @@ Song *newSong(const char *url, Directory * parentDir) return song; } -void freeSong(Song * song) -{ - deleteASongFromPlaylist(song); - freeJustSong(song); -} - void freeJustSong(Song * song) { if (song->tag) -- cgit v1.2.3