dax_thread_init(3dax) 맨 페이지 - 윈디하나의 솔라나라

개요

섹션
맨 페이지 이름
검색(S)

dax_thread_init(3dax)

dax_thread_init(3DAX)        DAX Library Functions       dax_thread_init(3DAX)



NAME
       dax_thread_init - create a command context

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

       #include <dax.h>

       dax_status_t
       dax_thread_init(unsigned major, unsigned minor, uint64_t options,
           dax_init_options_t *args, dax_context_t **ctx);

DESCRIPTION
       This  function  initializes  the  DAX for use by the calling thread and
       returns a DAX context in ctx. Only the thread that creates the  context
       should use it.


       The  major  parameter identifies the major version of the libdax API to
       be used, and minor identifies the minor version. Supported combinations
       are:


       tab(); cw(i) cw(i) cw(i) cw(i) majorminor _ 11 21



       The following are the values for the options parameter, and they can be
       logically OR'd together:


       DAX_ALLOC

           The   libdax    library    uses    the    args->alloc_func()    and
           args->free_func()  functions  to  allocate  and  free memory in DAX
           functions that use ctx. The alloc_func() must return a pointer that
           is  at  least 8 byte aligned. The functions use the following argu‐
           ments:

             ptr = alloc_func(size, args->cb_data);
             free_func(ptr, size, args->cb_data);




       DAX_EMULATE

           By default, DAX operations are done in hardware when possible,  and
           emulated in software when hardware support is not present. DAX_EMU‐
           LATE forces software emulation to be used in  all  cases.  Software
           emulation  can also be selected at runtime, by setting the DAX_EMU‐
           LATE environment variable to 1.




       Sets debug options for ctx to the value of the DAX_DEBUG_OPTIONS  envi‐
       ronment  variable if it is defined, else sets options to DAX_DEBUG_ARG.
       The format of DAX_DEBUG_OPTIONS is a comma  separated  list  of  option
       names  with  no  whitespace.  Recognized  names are "arg", "extra", and
       "all". The latter enables all options. For more  information,  see  the
       dax_set_debug(3DAX) man page.


       Sets  log  options for ctx to the value of the DAX_LOG_OPTIONS environ‐
       ment variable if it is defined, else sets the options  to  DAX_LOG_OFF.
       The format of DAX_LOG_OPTIONS is a comma separated list of option names
       with no whitespace. Recognized  names  are  "error",  "warn",  "entry",
       "return", "perf", "verbose", and "all". The latter enables all options.
       For more information, see the dax_set_log(3DAX) man page.


       Sends log messages to the file descriptor specified by  the  DAX_LOG_FD
       environment  variable. Its format is an integer. Sends messages to sys‐
       log(3c) if DAX_LOG_OPTIONS is set but DAX_LOG_FD is not defined.

RETURN VALUES
       DAX_SUCCESS      Operation completed successfully


       DAX_EBADVER      Bad API version


       DAX_ENOACCESS    Caller does not have permission to use DAX


       DAX_ENOMEM       Memory resources are unavailable


       DAX_ENODEV       No DAX device present


       DAX_EINVAL       Unknown  options,  or  DAX_ALLOC  is   specified   and
                        alloc_func() or free_func() is NULL.


       DAX_EINTERNAL    Unknown internal error



USAGE
       For  best  performance,  the alloc_func() function should return memory
       backed by large pages. Oracle Solaris creates large pages  by  default,
       and  you  can  change  the default page size by using the MC_HAT_ADVISE
       option of memcntl(2).


       DAX_EMULATE is useful for developing libdax applications  on  platforms
       that  do not support DAX hardware. But emulation is not recommended for
       production, as the emulation functions are not  optimized  and  perfor‐
       mance will be low.

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


       tab()  box; cw(2.75i) |cw(2.75i) lw(2.75i) |lw(2.75i) ATTRIBUTE TYPEAT‐
       TRIBUTE VALUE _ Availabilitysystem/library _ Interface StabilityCommit‐
       ted


SEE ALSO
       dax_thread_fini(3DAX),   dax_set_debug(3DAX),  dax_set_log(3DAX),  lib‐
       dax(3LIB), privileges(5), memcntl(2)



Oracle Solaris 11.4               26 Nov 2018            dax_thread_init(3DAX)
맨 페이지 내용의 저작권은 맨 페이지 작성자에게 있습니다.
RSS ATOM XHTML 5 CSS3