Lock-free multi-producer single-consumer (MPSC) ring buffer.
More...
#include <cstddef>
#include <errno.h>
#include <inttypes.h>
#include <limits.h>
#include <stdbool.h>
#include <stddef.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <algorithm>
#include <atomic>
#include <cassert>
#include <memory>
#include <libpmemobj++/detail/atomic_backoff.hpp>
Go to the source code of this file.
|
#define | __predict_false(x) (x) |
|
|
typedef uint64_t | pmem::obj::experimental::ringbuf::ringbuf_off_t |
|
|
static size_t | pmem::obj::experimental::ringbuf::WRAP_INCR (size_t x) |
|
ringbuf_worker_t * | pmem::obj::experimental::ringbuf::ringbuf_register (ringbuf_t *rbuf, unsigned i) |
|
void | pmem::obj::experimental::ringbuf::ringbuf_unregister (ringbuf_t *rbuf, ringbuf_worker_t *w) |
|
static ringbuf_off_t | pmem::obj::experimental::ringbuf::stable_nextoff (ringbuf_t *rbuf) |
|
static ringbuf_off_t | pmem::obj::experimental::ringbuf::stable_seenoff (ringbuf_worker_t *w) |
|
ptrdiff_t | pmem::obj::experimental::ringbuf::ringbuf_acquire (ringbuf_t *rbuf, ringbuf_worker_t *w, size_t len) |
|
void | pmem::obj::experimental::ringbuf::ringbuf_produce (ringbuf_t *rbuf, ringbuf_worker_t *w) |
|
size_t | pmem::obj::experimental::ringbuf::ringbuf_consume (ringbuf_t *rbuf, size_t *offset) |
|
void | pmem::obj::experimental::ringbuf::ringbuf_release (ringbuf_t *rbuf, size_t nbytes) |
|
|
static constexpr size_t | pmem::obj::experimental::ringbuf::RBUF_OFF_MASK = 0x00000000ffffffffUL |
|
static constexpr size_t | pmem::obj::experimental::ringbuf::WRAP_LOCK_BIT = 0x8000000000000000UL |
|
static constexpr size_t | pmem::obj::experimental::ringbuf::RBUF_OFF_MAX = UINT64_MAX & ~WRAP_LOCK_BIT |
|
static constexpr size_t | pmem::obj::experimental::ringbuf::WRAP_COUNTER = 0x7fffffff00000000UL |
|
Lock-free multi-producer single-consumer (MPSC) ring buffer.
Based on: https://github.com/rmind/ringbuf