Cleanup: ring buffer: remove lib_ring_buffer_switch_new_end()
[lttng-ust.git] / libringbuffer / frontend_api.h
index 6a06bba2c2393ba139bc506a8f88bb4027b59ea9..b5406b0ef9d3678d44f706b23d66117b5659fd9e 100644 (file)
@@ -55,12 +55,12 @@ int lib_ring_buffer_get_cpu(const struct lttng_ust_lib_ring_buffer_config *confi
 
        rcu_read_lock();
        cpu = lttng_ust_get_cpu();
-       nesting = ++lib_ring_buffer_nesting;    /* TLS */
+       nesting = ++URCU_TLS(lib_ring_buffer_nesting);
        cmm_barrier();
 
        if (caa_unlikely(nesting > 4)) {
                WARN_ON_ONCE(1);
-               lib_ring_buffer_nesting--;      /* TLS */
+               URCU_TLS(lib_ring_buffer_nesting)--;
                rcu_read_unlock();
                return -EPERM;
        } else
@@ -74,7 +74,7 @@ static inline
 void lib_ring_buffer_put_cpu(const struct lttng_ust_lib_ring_buffer_config *config)
 {
        cmm_barrier();
-       lib_ring_buffer_nesting--;              /* TLS */
+       URCU_TLS(lib_ring_buffer_nesting)--;            /* TLS */
        rcu_read_unlock();
 }
 
@@ -126,14 +126,6 @@ int lib_ring_buffer_try_reserve(const struct lttng_ust_lib_ring_buffer_config *c
         * boundary. It's safe to write.
         */
        *o_end = *o_begin + ctx->slot_size;
-
-       if (caa_unlikely((subbuf_offset(*o_end, chan)) == 0))
-               /*
-                * The offset_end will fall at the very beginning of the next
-                * subbuffer.
-                */
-               return 1;
-
        return 0;
 }
 
This page took 0.025273 seconds and 4 git commands to generate.