Go to main content

man pages section 3: DAX Library Functions

Exit Print View

Updated: Wednesday, July 27, 2022
 
 

dax_copy (3DAX)

Name

dax_copy - copy a memory range

Synopsis

cc [ flag... ] file... -ldax [ library...]

#include <dax.h>

dax_result_t
dax_copy(dax_context_t *ctx, uint64_t flags,
    void *src, void *dst, size_t count);

Description

This function copies the number of bytes specified in count from src to dst. There is no alignment restriction on src, dst, or count. The address ranges of the src and dst must not overlap.

Supported Flags

DAX_CACHE_DST

Writes results to cache. If not specified, invalidates the address range for dst in the cache, and writes the result to the main memory. For more information, see the dax_scan_value(3DAX) man page.

DAX_NOWAIT

If the DAX command queue is full, returns without submitting the command, instead of waiting to submit.

Return Values

Returns 0 in the dax_result_t count field and sets the dax_result_t status field to one of the following values.

DAX_SUCCESS

Operation completed successfully

DAX_EINVAL

Invalid argument, detected by libdax

DAX_EADI

ADI mismatch error for an input or output buffer

DAX_ETHREAD

The calling thread did not create ctx

DAX_EBUSY

DAX is busy and nowait was requested

DAX_EINTERNAL

Unknown internal error. Caller must stop using ctx.

Attributes

See attributes(7) for descriptions of the following attributes:

ATTRIBUTE TYPE
ATTRIBUTE VALUE
Availability
system/library
Interface Stability
Committed

See Also

libdax(3LIB), dax_adi(3DAX), dax_dtrace(3DAX)