PMDK C++ bindings  1.13.0-git107.g7e59f08f
This is the C++ bindings documentation for PMDK's libpmemobj.
ringbuf.hpp File Reference

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>
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

 pmem
 Persistent memory namespace.
 
 pmem::obj
 Main libpmemobj namespace.
 
 pmem::obj::experimental
 Experimental implementations.
 

Macros

#define __predict_false(x)   (x)
 

Typedefs

typedef uint64_t pmem::obj::experimental::ringbuf::ringbuf_off_t
 

Functions

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)
 

Variables

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
 

Detailed Description

Lock-free multi-producer single-consumer (MPSC) ring buffer.

Based on: https://github.com/rmind/ringbuf