aboutsummaryrefslogtreecommitdiffstats
path: root/src/song.h
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.h
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.h2
1 files changed, 0 insertions, 2 deletions
diff --git a/src/song.h b/src/song.h
index b5f316955..fddd5ccfd 100644
--- a/src/song.h
+++ b/src/song.h
@@ -42,8 +42,6 @@ song_alloc(const char *url, struct _Directory *parent);
Song *newSong(const char *url, struct _Directory *parentDir);
-void freeSong(Song *);
-
void freeJustSong(Song *);
int updateSongInfo(Song * song);