Version 2.5.7
[lttng-ust.git] / libringbuffer / backend_internal.h
index 373e3147e383c143dc7273253d584f922a421a50..1045a60c2760ae2314f4d0ab89a7aedcebabf387 100644 (file)
@@ -240,9 +240,10 @@ unsigned long subbuffer_get_records_count(
 
 /*
  * Must be executed at subbuffer delivery when the writer has _exclusive_
- * subbuffer access. See ring_buffer_check_deliver() for details.
- * ring_buffer_get_records_count() must be called to get the records count
- * before this function, because it resets the records_commit count.
+ * subbuffer access. See lib_ring_buffer_check_deliver() for details.
+ * lib_ring_buffer_get_records_count() must be called to get the records
+ * count before this function, because it resets the records_commit
+ * count.
  */
 static inline
 unsigned long subbuffer_count_records_overrun(
@@ -446,9 +447,21 @@ do {                                                               \
                inline_memcpy(dest, src, __len);                \
 } while (0)
 
+/*
+ * write len bytes to dest with c
+ */
+static inline
+void lib_ring_buffer_do_memset(char *dest, int c, unsigned long len)
+{
+       unsigned long i;
+
+       for (i = 0; i < len; i++)
+               dest[i] = c;
+}
+
 /* arch-agnostic implementation */
 
-static inline int fls(unsigned int x)
+static inline int lttng_ust_fls(unsigned int x)
 {
        int r = 32;
 
@@ -481,7 +494,7 @@ static inline int get_count_order(unsigned int count)
 {
        int order;
 
-       order = fls(count) - 1;
+       order = lttng_ust_fls(count) - 1;
        if (count & (count - 1))
                order++;
        return order;
This page took 0.023477 seconds and 4 git commands to generate.