Register the consuming function and add a library context
authorJulien Desfossez <julien.desfossez@polymtl.ca>
Fri, 12 Aug 2011 13:36:47 +0000 (09:36 -0400)
committerDavid Goulet <david.goulet@polymtl.ca>
Fri, 12 Aug 2011 14:56:16 +0000 (10:56 -0400)
commitcb040cc13fdbe2d5561c4ee10d94701436b9c8ae
treeccf8e882e6867161bc9c368b9092ab10f51ac8a0
parentc72c2927a2478c534b64593bb31507dc010daf34
Register the consuming function and add a library context

The init function of the library now takes a function as argument to
allow a consumer using the library to control the function to be called
when data is ready in a buffer.

The kconsumerd_on_read_subbuffer_mmap and
kconsumerd_on_read_subbuffer_splice are now exported to allow a consumer
to use them directly if needed.

Also the library has now a context, where all local parameters are
registered instead of static variables. That way, we can have multiple
callers using the library within the same process. Only the flag
indicating that all fds are closed remain global to the library and
shared among callers.

Acked-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Signed-off-by: Julien Desfossez <julien.desfossez@polymtl.ca>
liblttkconsumerd/lttkconsumerd.c
liblttkconsumerd/lttkconsumerd.h
ltt-kconsumerd/ltt-kconsumerd.c
This page took 0.02783 seconds and 5 git commands to generate.