relayd: Implement custom EfficiOS session clear
[lttng-tools.git] / src / bin / lttng-relayd / ctf-trace.c
index 27009efc38270bd0e46adc6b046f59134c8b5b12..600d0bcae855938042f06252ad5cc495b521075b 100644 (file)
@@ -211,3 +211,25 @@ end:
        rcu_read_unlock();
        return vstream;
 }
+
+int ctf_trace_clear(struct ctf_trace *trace)
+{
+       struct relay_stream *stream;
+       int ret = 0;
+
+       rcu_read_lock();
+       cds_list_for_each_entry_rcu(stream, &trace->stream_list,
+                       stream_node) {
+               if (!stream_get(stream)) {
+                       continue;
+               }
+               ret = stream_clear(stream);
+               stream_put(stream);
+               if (ret) {
+                       goto unlock;
+               }
+       }
+unlock:
+       rcu_read_unlock();
+       return ret;
+}
This page took 0.024198 seconds and 5 git commands to generate.