1. 14 Jan, 2009 2 commits
  2. 03 Jan, 2009 1 commit
  3. 28 Dec, 2008 2 commits
  4. 20 Oct, 2008 2 commits
    • Eric Wong's avatar
      update: fix multiple deletes from *vec iterators · d52437d4
      Eric Wong authored
      {song,dir}vec_for_each each failed to gracefully handle deleted
      files when iterating through.  While we were thread-safe, we
      were not safe within the calling thread.  If a callback we
      passed caused sv->nr to shring, our index would still increment;
      causing files to stay in the database.
      
      A way to test this is to remove 10 or so contiguous songs from a
      >10 song directory.
      d52437d4
    • Eric Wong's avatar
      {dir,song}vec: these structs are const · 686a6df3
      Eric Wong authored
      We definitely don't modify them here.
      686a6df3
  5. 14 Oct, 2008 1 commit
  6. 13 Oct, 2008 1 commit
    • Eric Wong's avatar
      songvec: avoid holding nr_lock during free(3) · 313405ed
      Eric Wong authored
      We only need to lock sv->nr changes to prevent traversals ( why
      it's called "nr_lock").  free(3) is a "slow" function on my
      system; so we can avoid unnecessarily holding a lock long for
      longer than needed.
      313405ed
  7. 08 Oct, 2008 2 commits
  8. 07 Oct, 2008 3 commits
    • Max Kellermann's avatar
      songvec: pass const pointers · f0366cc8
      Max Kellermann authored
      Pass const songvec pointers to songvec_find() and songvec_for_each().
      f0366cc8
    • Eric Wong's avatar
      songvec: lock traversals for thread-safe updates/reads · 45334a23
      Eric Wong authored
      Only one lock is used for all songvec traversals since
      they're rarely changed.  Also, minimize lock time and
      release it before calling iterator functions since they
      may block (updateSongInfo => stat/open/seek/read).
      
      This lock only protects songvecs (and all of them) during
      traversals; not the individual song structures themselves.
      45334a23
    • Eric Wong's avatar
      songvec: add songvec_for_each iterator · bb04c634
      Eric Wong authored
      This is so we can more consistently deal with locking
      needed for thread-safety in iterator functions.
      bb04c634
  9. 29 Sep, 2008 2 commits
  10. 23 Sep, 2008 3 commits
    • Eric Wong's avatar
      songvec: avoid free(NULL) · ef359260
      Eric Wong authored
      Potentially broken free() implementations don't like it
      ef359260
    • Eric Wong's avatar
      songvec: remove songvec_prune · 28d39948
      Eric Wong authored
      Any pruned files will be noticed during update and pruned
      from the live database, so this inefficient function can
      go away and never come back.
      28d39948
    • Eric Wong's avatar
      Replace SongList with struct songvec · 0bec1d38
      Eric Wong authored
      Our linked-list implementation is wasteful and the
      SongList isn't modified enough to benefit from being a linked
      list.  So use a more compact array of song pointers which
      saves ~200K on a library with ~9K songs (on x86-32).
      0bec1d38