changeset 2669:0b4949cad842 trunk

[svn] - tuple operations do not change the structure of the playlist and shouldn't block via mutexlock accordingly
author nenolod
date Tue, 10 Apr 2007 11:20:21 -0700
parents d5da5d37ec8b
children 84a10fce92a1
files ChangeLog src/audacious/build_stamp.c src/audacious/playlist.c
diffstat 3 files changed, 13 insertions(+), 12 deletions(-) [+]
line wrap: on
line diff
--- a/ChangeLog	Tue Apr 10 11:12:56 2007 -0700
+++ b/ChangeLog	Tue Apr 10 11:20:21 2007 -0700
@@ -1,3 +1,15 @@
+2007-04-10 18:12:56 +0000  William Pitcock <nenolod@sacredspiral.co.uk>
+  revision [4362]
+  - unlock many playlist operations that do not really need locking
+  - information retrieval should not be atomic
+  - add code to expose potentially unnecessary playlist locks
+  - now playlists with remote URIs can mostly be probed in the background
+  
+  trunk/src/audacious/playlist.c |   82 +++++++++++++++++------------------------
+  trunk/src/audacious/playlist.h |    4 +-
+  2 files changed, 37 insertions(+), 49 deletions(-)
+
+
 2007-04-10 17:17:48 +0000  William Pitcock <nenolod@sacredspiral.co.uk>
   revision [4360]
   - probe remote sources (hardcoded to http://, https://) in the background.
--- a/src/audacious/build_stamp.c	Tue Apr 10 11:12:56 2007 -0700
+++ b/src/audacious/build_stamp.c	Tue Apr 10 11:20:21 2007 -0700
@@ -1,2 +1,2 @@
 #include <glib.h>
-const gchar *svn_stamp = "20070410-4360";
+const gchar *svn_stamp = "20070410-4362";
--- a/src/audacious/playlist.c	Tue Apr 10 11:12:56 2007 -0700
+++ b/src/audacious/playlist.c	Tue Apr 10 11:20:21 2007 -0700
@@ -1881,10 +1881,7 @@
     if (!playlist)
         return NULL;
 
-    PLAYLIST_LOCK(playlist->mutex);
-
     if (!(node = g_list_nth(playlist->entries, pos))) {
-        PLAYLIST_UNLOCK(playlist->mutex);
         return NULL;
     }
 
@@ -1900,8 +1897,6 @@
         tuple = entry->tuple;
     }
 
-    PLAYLIST_UNLOCK(playlist->mutex);
-
     return tuple;
 }
 
@@ -1915,10 +1910,7 @@
     if (!playlist)
         return -1;
 
-    PLAYLIST_LOCK(playlist->mutex);
-
     if (!(node = g_list_nth(playlist->entries, pos))) {
-        PLAYLIST_UNLOCK(playlist->mutex);
         return -1;
     }
 
@@ -1928,12 +1920,9 @@
 
         if (playlist_entry_get_info(entry))
             song_time = entry->length;
-
-        PLAYLIST_UNLOCK(playlist->mutex);
     }
     else {
         song_time = entry->length;
-        PLAYLIST_UNLOCK(playlist->mutex);
     }
 
     return song_time;