projects
/
lttng-ust.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix ABI: add padding to tracepoint and ring buffer config public structures
[lttng-ust.git]
/
libringbuffer
/
ring_buffer_backend.c
diff --git
a/libringbuffer/ring_buffer_backend.c
b/libringbuffer/ring_buffer_backend.c
index d676b5f8a77c22864f0b93aa3fc77243b665fca9..769e24bffa0c35475aee4ddcec62b60b4b618d93 100644
(file)
--- a/
libringbuffer/ring_buffer_backend.c
+++ b/
libringbuffer/ring_buffer_backend.c
@@
-6,9
+6,9
@@
* Dual LGPL v2.1/GPL v2 license.
*/
* Dual LGPL v2.1/GPL v2 license.
*/
+#define _GNU_SOURCE
#include <urcu/arch.h>
#include <urcu/arch.h>
-
-#include "lttng/core.h"
+#include <limits.h>
#include <lttng/ringbuffer-config.h>
#include "vatomic.h"
#include <lttng/ringbuffer-config.h>
#include "vatomic.h"
@@
-220,8
+220,10
@@
int channel_backend_init(struct channel_backend *chanb,
/*
* Make sure the number of subbuffers and subbuffer size are power of 2.
*/
/*
* Make sure the number of subbuffers and subbuffer size are power of 2.
*/
- CHAN_WARN_ON(chanb, hweight32(subbuf_size) != 1);
- CHAN_WARN_ON(chanb, hweight32(num_subbuf) != 1);
+ if (hweight32(subbuf_size) != 1)
+ return -EINVAL;
+ if (hweight32(num_subbuf) != 1)
+ return -EINVAL;
ret = subbuffer_id_check_index(config, num_subbuf);
if (ret)
ret = subbuffer_id_check_index(config, num_subbuf);
if (ret)
@@
-294,6
+296,7
@@
int channel_backend_init(struct channel_backend *chanb,
buf = shmp(handle, chanb->buf[0].shmp);
if (!buf)
goto end;
buf = shmp(handle, chanb->buf[0].shmp);
if (!buf)
goto end;
+ set_shmp(buf->self, chanb->buf[0].shmp._ref);
ret = lib_ring_buffer_create(buf, chanb, -1,
handle, shmobj);
if (ret)
ret = lib_ring_buffer_create(buf, chanb, -1,
handle, shmobj);
if (ret)
This page took
0.034372 seconds
and
4
git commands to generate.