<feed xmlns='http://www.w3.org/2005/Atom'>
<title>paraslash/ipc.h, branch v0.3</title>
<subtitle>paraslash - network audio streaming tools</subtitle>
<id>https://git.tue.mpg.de/cgit/paraslash/atom?h=v0.3</id>
<link rel='self' href='https://git.tue.mpg.de/cgit/paraslash/atom?h=v0.3'/>
<link rel='alternate' type='text/html' href='https://git.tue.mpg.de/cgit/paraslash/'/>
<updated>2008-03-24T23:18:01Z</updated>
<entry>
<title>Complete the afs callback conversion.</title>
<updated>2008-03-24T23:18:01Z</updated>
<author>
<name>Andre Noll</name>
<email>maan@systemlinux.org</email>
</author>
<published>2008-03-24T23:18:01Z</published>
<link rel='alternate' type='text/html' href='https://git.tue.mpg.de/cgit/paraslash/commit/?id=49bd626084bf5f48e4d80075258b6da4703752cf'/>
<id>urn:sha1:49bd626084bf5f48e4d80075258b6da4703752cf</id>
<content type='text'>
This makes it possible for the callbacks to pass a partial
result buffer through the command handler &lt;-&gt; callback socket.
This removes a serious limitation of previous paraslash-0.3.x
versions: As callbacks could not send data directly to the
command handler they had to store the full command output in
a buffer. This buffer was sent to the command handler after the
callback returns.

The problem with this approach is that it caused the callbacks
to  allocate large amounts of memory. If that amount exceeded what
can be stored in a shared memory area (32MB on Linux), the command
even failed.

The fix consists of adding a max_size field and a max_size_handler
function pointer to the para_buffer structure. Whenever para_printf()
would need to allocate more memory than specified by max_size, it
calls the max_size_handler which is supposed to send out the data.
para_printf then prints the requested data into the old but now
empty buffer.

Almost all users set the max_size_handler to pass_buffer_as_shm(),
a helper function implemented in afs.c that copies the buffer to
a shared memory area and sends its identifier through the socket.
</content>
</entry>
<entry>
<title>add more missing documentation</title>
<updated>2007-02-10T18:54:26Z</updated>
<author>
<name>Andre Noll</name>
<email>maan@systemlinux.org</email>
</author>
<published>2007-02-10T18:54:26Z</published>
<link rel='alternate' type='text/html' href='https://git.tue.mpg.de/cgit/paraslash/commit/?id=c79899fe6a1e8eb3086749f46c599d9790d99921'/>
<id>urn:sha1:c79899fe6a1e8eb3086749f46c599d9790d99921</id>
<content type='text'>
</content>
</entry>
<entry>
<title>fix the plm database tool</title>
<updated>2006-02-21T14:52:45Z</updated>
<author>
<name>Andre</name>
<email>maan@p133.(none)</email>
</author>
<published>2006-02-21T14:52:45Z</published>
<link rel='alternate' type='text/html' href='https://git.tue.mpg.de/cgit/paraslash/commit/?id=c5517c98d28a74a89086b0641e3633d16eaf9df7'/>
<id>urn:sha1:c5517c98d28a74a89086b0641e3633d16eaf9df7</id>
<content type='text'>
(Re)loading the playlist uses the new mutex and
shm helpers and is hopefully a race-free implementation.

It works as follows:

	The plm init function (parent, server context) reserves
	a shared memory area (client data) as well as two unlocked
	mutexes. The first mutex serializes access for racing clients
	that want to replace the playlist. The second mutex serializes
	the access between parent and child (com_lpl()).

	com_lpl() loads the playlist from the client into a tmp buffer.
	It then creates a shm area (client_shm) and copies that buffer
	to the area.  Further, another mutex (shm) is created. This
	mutex is initially locked.

	Next, it grabs the client lock and the server lock, and updates
	client_data with the id of client_shm. Then the parent is
	woken up (SIGUSR1) and the server lock is released. com_lpl()
	finally goes to sleep by acquiring the shm lock.

	In this situation, only the parent may run. It grabs the
	server lock, reads client_data to attach client_shm and
	reloads the playlist with data from client_shm. When ready,
	the parent detaches client_shm, and drops the shm lock and
	the server lock.

	This wakes up com_lpl() which destroys client_shm, the
	shm mutex and the tmp buffer.
</content>
</entry>
<entry>
<title>The new ipc subsystem</title>
<updated>2006-02-21T07:12:46Z</updated>
<author>
<name>Andre</name>
<email>maan@p133.(none)</email>
</author>
<published>2006-02-21T07:12:46Z</published>
<link rel='alternate' type='text/html' href='https://git.tue.mpg.de/cgit/paraslash/commit/?id=bad57eee70cdca87e8ba1af08d4e2ef6d2878620'/>
<id>urn:sha1:bad57eee70cdca87e8ba1af08d4e2ef6d2878620</id>
<content type='text'>
Contains functions for dealing with mutexes and shared memory.
</content>
</entry>
</feed>
