aboutsummaryrefslogtreecommitdiffstats
path: root/src/song.c
diff options
context:
space:
mode:
authorEric Wong <normalperson@yhbt.net>2008-10-07 22:11:16 +0200
committerMax Kellermann <max@duempel.org>2008-10-07 22:11:16 +0200
commit7d8c9cc7e31e15b93af7c08f7d03ed8ca10f5454 (patch)
treed492791706dbf323eec84c2331308bf61566af82 /src/song.c
parent2b965a5424b9e15f23794c0667c7eff95759dbb5 (diff)
downloadmpd-7d8c9cc7e31e15b93af7c08f7d03ed8ca10f5454.tar.gz
mpd-7d8c9cc7e31e15b93af7c08f7d03ed8ca10f5454.tar.xz
mpd-7d8c9cc7e31e15b93af7c08f7d03ed8ca10f5454.zip
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.
Diffstat (limited to '')
-rw-r--r--src/song.c6
1 files changed, 0 insertions, 6 deletions
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)