* Dual LGPL v2.1/GPL v2 license.
*/
+#include <urcu/compiler.h>
+
#include "config.h"
#include "backend.h"
#include "frontend.h"
struct channel_backend *chanb, int cpu)
{
const struct lib_ring_buffer_config *config = chanb->config;
- struct channel *chan = container_of(chanb, struct channel, backend);
+ struct channel *chan = caa_container_of(chanb, struct channel, backend);
void *priv = chanb->priv;
unsigned int num_subbuf;
size_t subbuf_header_size;
void *hcpu)
{
unsigned int cpu = (unsigned long)hcpu;
- struct channel *chan = container_of(nb, struct channel,
+ struct channel *chan = caa_container_of(nb, struct channel,
cpu_hp_notifier);
struct lib_ring_buffer *buf = per_cpu_ptr(chan->backend.buf, cpu);
const struct lib_ring_buffer_config *config = chan->backend.config;
unsigned long val,
void *data)
{
- struct channel *chan = container_of(nb, struct channel,
+ struct channel *chan = caa_container_of(nb, struct channel,
tick_nohz_notifier);
const struct lib_ring_buffer_config *config = chan->backend.config;
struct lib_ring_buffer *buf;
static
void channel_release(struct kref *kref)
{
- struct channel *chan = container_of(kref, struct channel, ref);
+ struct channel *chan = caa_container_of(kref, struct channel, ref);
channel_free(chan);
}
* Perform flush before writing to finalized.
*/
smp_wmb();
- ACCESS_ONCE(buf->finalized) = 1;
+ CMM_ACCESS_ONCE(buf->finalized) = 1;
wake_up_interruptible(&buf->read_wait);
}
} else {
* Perform flush before writing to finalized.
*/
smp_wmb();
- ACCESS_ONCE(buf->finalized) = 1;
+ CMM_ACCESS_ONCE(buf->finalized) = 1;
wake_up_interruptible(&buf->read_wait);
}
- ACCESS_ONCE(chan->finalized) = 1;
+ CMM_ACCESS_ONCE(chan->finalized) = 1;
wake_up_interruptible(&chan->hp_wait);
wake_up_interruptible(&chan->read_wait);
kref_put(&chan->ref, channel_release);
int finalized;
retry:
- finalized = ACCESS_ONCE(buf->finalized);
+ finalized = CMM_ACCESS_ONCE(buf->finalized);
/*
* Read finalized before counters.
*/
int finalized;
retry:
- finalized = ACCESS_ONCE(buf->finalized);
+ finalized = CMM_ACCESS_ONCE(buf->finalized);
/*
* Read finalized before counters.
*/