From: Julien Desfossez Date: Fri, 12 Aug 2011 13:36:47 +0000 (-0400) Subject: Register the consuming function and add a library context X-Git-Tag: v2.0-pre11~4 X-Git-Url: http://git.lttng.org./?a=commitdiff_plain;h=cb040cc13fdbe2d5561c4ee10d94701436b9c8ae;hp=cb040cc13fdbe2d5561c4ee10d94701436b9c8ae;p=lttng-tools.git 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 Signed-off-by: Julien Desfossez ---