~vcs-imports/mpd/trunk

Viewing all changes in revision 1865.

  • Committer: normalperson
  • Date: 2008-06-30 02:42:40 UTC
  • Revision ID: vcs-imports@canonical.com-20080630024240-48tf5uhttl0gl389
Add a generic ring buffer implementation

This piece of code is from the JACK Audio Connection Kit
(trimmed down a bit for better readability).

The vector functions now reuse the common iovec struct used by
writev/readv instead of reinventing an identical but
differently-named struct.

From the comments:
> ISO/POSIX C version of Paul Davis's lock free ringbuffer C++ code.
> This is safe for the case of one read thread and one write thread.

License is LGPL 2.1 or later

expand all expand all

Show diffs side-by-side

added added

removed removed

Lines of Context: