Go to main content

man pages section 3: DAX Library Functions

Exit Print View

Updated: July 2017
 
 

dax_fill (3DAX)

Name

dax_fill - fill a memory range with a value

Synopsis

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

#include <dax.h> 

dax_result_t
dax_fill(dax_context_t *ctx, uint64_t flags,
    uint64_t val, void *dst, uint64_t count, unsigned val_width);

Description

This function writes a value to dst, the number of times specified by count.

The low order val_width bytes of val gives the value. val_width can be 1, 2, 4, or 8 bytes. There is no alignment restriction on dst.

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(5) 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)