8 #include <common/xroad_spsc_queue.h>
20 xroad_spsc_producer_t prod;
23 #define XROAD_TRACE_SDK_NONINLINE inline
29 if (xroad_unlikely(b.
size < rec_size))
31 xroad_spsc_prod_drop_inc(&writer->prod);
34 memcpy(b.
ptr, rec_data, rec_size);
35 xroad_spsc_prod_commit(&writer->prod, rec_size);
42 return writer->prod.buf_size;
Basic data buffer (either with data or for data)
Definition: xroad_common_types.h:117
size_t size
Size of the buffer.
Definition: xroad_common_types.h:119
char * ptr
Pointer to the buffer start.
Definition: xroad_common_types.h:118
Definition: xroad_tracing_nonsdk.h:19
bool xroad_traces_writer_is_enabled(xroad_trace_stream_t *writer)
Check whether tracing through the writer is enabled (to skip tracing-specific logic if tracing is dis...
Definition: xroad_tracing_nonsdk.h:40
bool xroad_traces_writer_write_record(xroad_trace_stream_t *writer, const void *rec_data, size_t rec_size)
Write record to the traces via writer.
Definition: xroad_tracing_nonsdk.h:26