Allow flush buffer for inactive producer (flush mode)
authorMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Sat, 5 Nov 2011 18:46:37 +0000 (14:46 -0400)
committerMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Sat, 5 Nov 2011 18:46:37 +0000 (14:46 -0400)
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
include/lttng/ust-ctl.h
liblttng-ust-ctl/ustctl.c

index 9d0d35c8e32f2a3bd4ad0ad6008d7486b39cbd47..7fd665488fdf4a4be4a7878aa78f55ac6dff1d82 100644 (file)
@@ -115,7 +115,8 @@ int ustctl_put_subbuf(struct lttng_ust_shm_handle *handle,
                struct lttng_ust_lib_ring_buffer *buf);
 
 int ustctl_flush_buffer(struct lttng_ust_shm_handle *handle,
-               struct lttng_ust_lib_ring_buffer *buf);
+               struct lttng_ust_lib_ring_buffer *buf,
+               int producer_active);
 
 /* Release object created by members of this API */
 void ustctl_release_object(int sock, struct lttng_ust_object_data *data);
index 886e8485bc8cf683736b52b788d04e9cfdc0f1cf..2d915260c8c522a2ac919b58a1222d48ec0c072c 100644 (file)
@@ -650,8 +650,11 @@ int ustctl_put_subbuf(struct lttng_ust_shm_handle *handle,
 }
 
 int ustctl_flush_buffer(struct lttng_ust_shm_handle *handle,
-               struct lttng_ust_lib_ring_buffer *buf)
+               struct lttng_ust_lib_ring_buffer *buf,
+               int producer_active)
 {
-       lib_ring_buffer_switch_slow(buf, SWITCH_ACTIVE, handle);
+       lib_ring_buffer_switch_slow(buf,
+               producer_active ? SWITCH_ACTIVE : SWITCH_FLUSH,
+               handle);
        return 0;
 }
This page took 0.02534 seconds and 4 git commands to generate.