barectf.h.j2: add barectf_packet_buf_addr()
[barectf.git] / barectf / templates / c / barectf.h.j2
index ccc5dc2ca72b64701747136e21dbee401e943977..8f52e19333f01418be7f803442fa1a6c84f9da92 100644 (file)
@@ -44,10 +44,16 @@ extern "C" {
 #endif
 
 {% if header_opts.identifier_prefix_definition %}
+/* Backward compatibility */
 #define _BARECTF_PREFIX {{ prefix }}
+
+#define _BARECTF_IDENTIFIER_PREFIX {{ prefix }}
 {% endif %}
 {% if def_dst and header_opts.default_data_stream_type_name_definition %}
+/* Backward compatibility */
 #define _BARECTF_DEFAULT_STREAM {{ def_dst.name }}
+
+#define _BARECTF_DEFAULT_DATA_STREAM_TYPE_NAME {{ def_dst.name }}
 {% endif %}
 {% if def_dst %}
 
@@ -62,7 +68,9 @@ uint32_t {{ prefix }}packet_size(const void *ctx);
 int {{ prefix }}packet_is_full(const void *ctx);
 int {{ prefix }}packet_is_empty(const void *ctx);
 uint32_t {{ prefix }}packet_events_discarded(const void *ctx);
+uint32_t {{ prefix }}discarded_event_records_count(const void * const ctx);
 uint8_t *{{ prefix }}packet_buf(const void *ctx);
+uint8_t *{{ prefix }}packet_buf_addr(const void * const ctx);
 void {{ prefix }}packet_set_buf(void *ctx, uint8_t *buf, uint32_t buf_size);
 uint32_t {{ prefix }}packet_buf_size(const void *ctx);
 int {{ prefix }}packet_is_open(const void *ctx);
@@ -75,13 +83,13 @@ void {{ prefix }}enable_tracing(void *ctx, int enable);
 struct {{ prefix }}platform_callbacks {
 {% set clk_types = trace_type.clock_types %}
 {% if clk_types %}
-       /* Clock callbacks */
+       /* Clock source callbacks */
        {% for clk_type in clk_types | sort %}
        {{ cg_opts.clock_type_c_types[clk_type] }} (*{{ clk_type.name }}_clock_get_value)(void *);
        {% endfor %}
 
 {% endif %}
-       /* Is the back-end full? */
+       /* Is the back end full? */
        int (*is_backend_full)(void *);
 
        /* Open packet */
@@ -126,7 +134,7 @@ struct {{ prefix }}ctx {
        /* Tracing is enabled? */
        volatile int is_tracing_enabled;
 
-       /* Use current/last event record time when opening/closing packets */
+       /* Use current/last event record timestamp when opening/closing packets */
        int use_cur_last_event_ts;
 };
 
This page took 0.02504 seconds and 4 git commands to generate.