Fix: c99: use __asm__ __volatile__
[lttng-ust.git] / src / common / ringbuffer-clients / template.h
index 5a4aa9538be65b7b2dad8e4894d92e2e64c8d521..fe8f8e020d22af883bd9daecd1f156620eb4308c 100644 (file)
@@ -74,7 +74,7 @@ static DEFINE_URCU_TLS(private_ctx_stack_t, private_ctx_stack);
  */
 void RING_BUFFER_MODE_TEMPLATE_ALLOC_TLS(void)
 {
-       asm volatile ("" : : "m" (URCU_TLS(private_ctx_stack)));
+       __asm__ __volatile__ ("" : : "m" (URCU_TLS(private_ctx_stack)));
 }
 
 static inline uint64_t lib_ring_buffer_clock_read(
@@ -399,7 +399,8 @@ static void client_buffer_begin(struct lttng_ust_ring_buffer *buf, uint64_t tsc,
  */
 static void client_buffer_end(struct lttng_ust_ring_buffer *buf, uint64_t tsc,
                              unsigned int subbuf_idx, unsigned long data_size,
-                             struct lttng_ust_shm_handle *handle)
+                             struct lttng_ust_shm_handle *handle,
+                             const struct lttng_ust_ring_buffer_ctx *ctx)
 {
        struct lttng_ust_ring_buffer_channel *chan = shmp(handle, buf->backend.chan);
        struct packet_header *header =
@@ -418,9 +419,9 @@ static void client_buffer_end(struct lttng_ust_ring_buffer *buf, uint64_t tsc,
        header->ctx.packet_size =
                (uint64_t) LTTNG_UST_PAGE_ALIGN(data_size) * CHAR_BIT;  /* in bits */
 
-       records_lost += lib_ring_buffer_get_records_lost_full(&client_config, buf);
-       records_lost += lib_ring_buffer_get_records_lost_wrap(&client_config, buf);
-       records_lost += lib_ring_buffer_get_records_lost_big(&client_config, buf);
+       records_lost += lib_ring_buffer_get_records_lost_full(&client_config, ctx);
+       records_lost += lib_ring_buffer_get_records_lost_wrap(&client_config, ctx);
+       records_lost += lib_ring_buffer_get_records_lost_big(&client_config, ctx);
        header->ctx.events_discarded = records_lost;
 }
 
@@ -787,10 +788,11 @@ int lttng_flush_buffer(struct lttng_ust_channel_buffer *chan)
        for_each_channel_cpu(cpu, rb_chan) {
                int shm_fd, wait_fd, wakeup_fd;
                uint64_t memory_map_size;
+               void *memory_map_addr;
 
                buf = channel_get_ring_buffer(&client_config, rb_chan,
                                cpu, rb_chan->handle, &shm_fd, &wait_fd,
-                               &wakeup_fd, &memory_map_size);
+                               &wakeup_fd, &memory_map_size, &memory_map_addr);
                lib_ring_buffer_switch(&client_config, buf,
                                SWITCH_ACTIVE, rb_chan->handle);
        }
This page took 0.02425 seconds and 4 git commands to generate.