diff options
author | Eric Wong <normalperson@yhbt.net> | 2008-10-07 22:11:16 +0200 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2008-10-07 22:11:16 +0200 |
commit | 7d8c9cc7e31e15b93af7c08f7d03ed8ca10f5454 (patch) | |
tree | d492791706dbf323eec84c2331308bf61566af82 /src/song.h | |
parent | 2b965a5424b9e15f23794c0667c7eff95759dbb5 (diff) | |
download | mpd-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 'src/song.h')
-rw-r--r-- | src/song.h | 2 |
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); |