Add sock flush buffer ctl API
[lttng-ust.git] / liblttng-ust-ctl / ustctl.c
index b612d2ce6e5819c4160bd4022cd20c366c082e4d..13100aebdcda0ba4f3b7aacc4242846e9e9c0937 100644 (file)
@@ -466,6 +466,22 @@ int ustctl_calibrate(int sock, struct lttng_ust_calibrate *calibrate)
        return -ENOSYS;
 }
 
+int ustctl_sock_flush_buffer(int sock, struct lttng_ust_object_data *object)
+{
+       struct ustcomm_ust_msg lum;
+       struct ustcomm_ust_reply lur;
+       int ret;
+
+       memset(&lum, 0, sizeof(lum));
+       lum.handle = object->handle;
+       lum.cmd = LTTNG_UST_FLUSH_BUFFER;
+       ret = ustcomm_send_app_cmd(sock, &lum, &lur);
+       if (ret)
+               return ret;
+       DBG("flushed buffer handle %u", object->handle);
+       return 0;
+}
+
 /* Buffer operations */
 
 /* Map channel shm into process memory */
This page took 0.023569 seconds and 4 git commands to generate.