Rename shm_handle to lttng_ust_shm_handle
[lttng-ust.git] / libringbuffer / backend.h
index d93f6d1fd09ef2da267ce0b0a7307202a3f9427c..6eb0cf0b4e8feb4ab3f69f2f51f6e0be874b22f8 100644 (file)
 
 extern size_t lib_ring_buffer_read(struct lib_ring_buffer_backend *bufb,
                                   size_t offset, void *dest, size_t len,
-                                  struct shm_handle *handle);
+                                  struct lttng_ust_shm_handle *handle);
 
 extern int lib_ring_buffer_read_cstr(struct lib_ring_buffer_backend *bufb,
                                     size_t offset, void *dest, size_t len,
-                                    struct shm_handle *handle);
+                                    struct lttng_ust_shm_handle *handle);
 
 /*
  * Return the address where a given offset is located.
@@ -43,11 +43,11 @@ extern int lib_ring_buffer_read_cstr(struct lib_ring_buffer_backend *bufb,
 extern void *
 lib_ring_buffer_offset_address(struct lib_ring_buffer_backend *bufb,
                               size_t offset,
-                              struct shm_handle *handle);
+                              struct lttng_ust_shm_handle *handle);
 extern void *
 lib_ring_buffer_read_offset_address(struct lib_ring_buffer_backend *bufb,
                                    size_t offset,
-                                   struct shm_handle *handle);
+                                   struct lttng_ust_shm_handle *handle);
 
 /**
  * lib_ring_buffer_write - write data to a buffer backend
@@ -68,7 +68,7 @@ void lib_ring_buffer_write(const struct lib_ring_buffer_config *config,
 {
        struct lib_ring_buffer_backend *bufb = &ctx->buf->backend;
        struct channel_backend *chanb = &ctx->chan->backend;
-       struct shm_handle *handle = ctx->handle;
+       struct lttng_ust_shm_handle *handle = ctx->handle;
        size_t sbidx;
        size_t offset = ctx->buf_offset;
        struct lib_ring_buffer_backend_pages_shmp *rpages;
@@ -88,7 +88,7 @@ void lib_ring_buffer_write(const struct lib_ring_buffer_config *config,
         */
        CHAN_WARN_ON(chanb, offset >= chanb->buf_size);
        lib_ring_buffer_do_copy(config,
-                               shmp_index(handle, shmp(handle, rpages->shmp)->p, offset & ~(chanb->subbuf_size - 1)),
+                               shmp_index(handle, shmp(handle, rpages->shmp)->p, offset & (chanb->subbuf_size - 1)),
                                src, len);
        ctx->buf_offset += len;
 }
@@ -102,7 +102,7 @@ static inline
 unsigned long lib_ring_buffer_get_records_unread(
                                const struct lib_ring_buffer_config *config,
                                struct lib_ring_buffer *buf,
-                               struct shm_handle *handle)
+                               struct lttng_ust_shm_handle *handle)
 {
        struct lib_ring_buffer_backend *bufb = &buf->backend;
        struct lib_ring_buffer_backend_pages_shmp *pages;
This page took 0.027269 seconds and 4 git commands to generate.