GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages
PMEMLOG_APPEND(3) PMDK Programmer's Manual PMEMLOG_APPEND(3)

pmemlog_append(), pmemlog_appendv() - append bytes to the persistent memory resident log file


#include <libpmemlog.h>
int pmemlog_append(PMEMlogpool *plp, const void *buf, size_t count);
int pmemlog_appendv(PMEMlogpool *plp, const struct iovec *iov, int iovcnt);

    

The pmemlog_append() function appends count bytes from buf to the current write offset in the log memory pool plp. Calling this function is analogous to appending to a file. The append is atomic and cannot be torn by a program failure or system crash.

The pmemlog_appendv() function appends to the log memory pool plp from the scatter/gather list iov in a manner similar to writev(2). The entire list of buffers is appended atomically, as if the buffers in iov were concatenated in order. The append is atomic and cannot be torn by a program failure or system crash.

On success, pmemlog_append() and pmemlog_appendv() return 0. On error, they return -1 and set errno appropriately.

EINVAL The vector count iovcnt is less than zero.

ENOSPC There is no room for the data in the log file.

EROFS The log file is open in read-only mode.

Since libpmemlog(3) is designed as a low-latency code path, many of the checks routinely done by the operating system for writev(2) are not practical in the library's implementation of pmemlog_appendv(). No attempt is made to detect NULL or incorrect pointers, for example.

writev(2), libpmemlog(7) and <http://pmem.io>
2019-07-10 PMDK - pmemlog API version 1.1

Search for    or go to Top of page |  Section 3 |  Main Index

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with ManDoc.