projects
/
lttng-ust.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Port ring buffer to userspace, part 1
[lttng-ust.git]
/
libringbuffer
/
frontend.h
diff --git
a/libringbuffer/frontend.h
b/libringbuffer/frontend.h
index 1eb4ae92d6c69cab1f184f572b21c647f5f866ee..9d73da16fee45b0f28937d86f2a459d04c6767a2 100644
(file)
--- a/
libringbuffer/frontend.h
+++ b/
libringbuffer/frontend.h
@@
-16,6
+16,9
@@
* Dual LGPL v2.1/GPL v2 license.
*/
* Dual LGPL v2.1/GPL v2 license.
*/
+#include <urcu/compiler.h>
+#include <urcu/uatomic.h>
+
/* Internal helpers */
#include "frontend_internal.h"
/* Internal helpers */
#include "frontend_internal.h"
@@
-60,7
+63,7
@@
void *channel_destroy(struct channel *chan);
#define for_each_channel_cpu(cpu, chan) \
for ((cpu) = -1; \
({ (cpu) = cpumask_next(cpu, (chan)->backend.cpumask); \
#define for_each_channel_cpu(cpu, chan) \
for ((cpu) = -1; \
({ (cpu) = cpumask_next(cpu, (chan)->backend.cpumask); \
- smp_read_barrier_depends(); (cpu) < nr_cpu_ids; });)
+
cmm_
smp_read_barrier_depends(); (cpu) < nr_cpu_ids; });)
extern struct lib_ring_buffer *channel_get_ring_buffer(
const struct lib_ring_buffer_config *config,
extern struct lib_ring_buffer *channel_get_ring_buffer(
const struct lib_ring_buffer_config *config,
@@
-118,7
+121,7
@@
static inline
unsigned long lib_ring_buffer_get_consumed(const struct lib_ring_buffer_config *config,
struct lib_ring_buffer *buf)
{
unsigned long lib_ring_buffer_get_consumed(const struct lib_ring_buffer_config *config,
struct lib_ring_buffer *buf)
{
- return
atomic_long
_read(&buf->consumed);
+ return
uatomic
_read(&buf->consumed);
}
/*
}
/*
@@
-129,11
+132,11
@@
static inline
int lib_ring_buffer_is_finalized(const struct lib_ring_buffer_config *config,
struct lib_ring_buffer *buf)
{
int lib_ring_buffer_is_finalized(const struct lib_ring_buffer_config *config,
struct lib_ring_buffer *buf)
{
- int finalized = ACCESS_ONCE(buf->finalized);
+ int finalized =
CMM_
ACCESS_ONCE(buf->finalized);
/*
* Read finalized before counters.
*/
/*
* Read finalized before counters.
*/
- smp_rmb();
+
cmm_
smp_rmb();
return finalized;
}
return finalized;
}
@@
-146,7
+149,7
@@
int lib_ring_buffer_channel_is_finalized(const struct channel *chan)
static inline
int lib_ring_buffer_channel_is_disabled(const struct channel *chan)
{
static inline
int lib_ring_buffer_channel_is_disabled(const struct channel *chan)
{
- return atomic_read(&chan->record_disabled);
+ return
u
atomic_read(&chan->record_disabled);
}
static inline
}
static inline
This page took
0.025225 seconds
and
4
git commands to generate.