X-Git-Url: http://git.lttng.org./?a=blobdiff_plain;f=libringbuffer%2Fbackend_internal.h;h=1045a60c2760ae2314f4d0ab89a7aedcebabf387;hb=57201bb34b010e8127ea824e12fd0a7e4b56fe0b;hp=050c98ac530dfc34f267ff9f23cb9bf8db84bbfd;hpb=9501d22f55b3a23f382f631c99b2325d1419b5da;p=lttng-ust.git diff --git a/libringbuffer/backend_internal.h b/libringbuffer/backend_internal.h index 050c98ac..1045a60c 100644 --- a/libringbuffer/backend_internal.h +++ b/libringbuffer/backend_internal.h @@ -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,6 +447,18 @@ 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 lttng_ust_fls(unsigned int x)