diff options
author | Eric Wong <normalperson@yhbt.net> | 2008-10-07 02:57:59 -0700 |
---|---|---|
committer | Eric Wong <normalperson@yhbt.net> | 2008-10-07 03:08:32 -0700 |
commit | 19c6f1ee92cf6514e885def44f7deb9d225de4dc (patch) | |
tree | 4e7d98a99de3212505e996c21edd1822906d9c20 /src/song.c | |
parent | a340bf0dee5bf134770f5d5f532efa90cdb08b3c (diff) | |
download | mpd-19c6f1ee92cf6514e885def44f7deb9d225de4dc.tar.gz mpd-19c6f1ee92cf6514e885def44f7deb9d225de4dc.tar.xz mpd-19c6f1ee92cf6514e885def44f7deb9d225de4dc.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.c | 6 |
1 files changed, 0 insertions, 6 deletions
diff --git a/src/song.c b/src/song.c index f967e3e17..c9301386d 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) |