rvm_query(3)

NAME
rvm_query - query RVM options

SYNOPSIS

#include "rvm.h"
rvm_return_t rvm_query (options,region)
rvm_options_t  *options;  /* pointer to a RVM options record */
rvm_region_t   *region;   /* optional pointer to a region descriptor */

DESCRIPTION
rvm_query allows inspection of the RVM options currently set. An options record, specified by options, is filled in with the values currently in effect. If this record is not valid, RVM_EOPTIONS will be returned. Please refer to the RVM manual for the details of options. If the name of the log file is to be returned, the caller must allocate a buffer of MAXPATHLEN+1 characters and place a pointer to it in the log_dev field. The file name will be copied into the buffer. The buffer will not be deallocated by RVM. If region is null, the options returned are those global to RVM, otherwise the options will be for the specified region. If the region does not point to a valid region descriptor, RVM_EREGION will be returned. If only the segment file is specified in the region descriptor, the options are those applicable to all mappings of the segment. If the offset, length, and vmaddr fields of the region descriptor are not zero, the options returned will reflect those of that region. If the region isnt mapped, RVM_ENOT_MAPPED is returned. Certain options reflect the the global state of RVM regardless of the region specified. The number of uncommitted transactions, if any, is returned in the n_uncommit field of the options descriptor. If uncommitted transactions exist, tid_array will contain a pointer to a vector of length n_uncommit of identifiers for the transactions. If a valid region descriptor has been specified, the uncommitted transaction descriptors returned will be only those modifying the specified region. Otherwise, all uncommitted transactions are returned. If a tid_array vector exists in the options record when rvm_query is called, it will be replaced to reflect the current status. For option records allocated with rvm_malloc_options, the array should not be deallocated by the application since this will be done by rvm_free_options. However, if the options record is allocated on the stack, the array must be explicitly deallocated by the application, or space will be lost. Deallocation of the array in statically allocated options records is optional: repeated use of the record will cause the array to be reallocated as necessary by rvm_query with no explicit action by the application. If you do deallocate the array, you must null the pointer to avoid a possible internal error due the dangling pointer.

DIAGNOSTICS

RVM_SUCCESS
    success

RVM_EREGION
    invalide region descriptor or pointer

RVM_ENOT_MAPPED
    region not mapped

RVM_EOPTIONS
    invalid options record or pointer

RVM_ENO_MEMORY
    heap exhausted

RVM_EINIT
    RVM not initialized

SEE ALSO
rvm_map (3), rvm_unmap (3), rvm_set_options (3), rvm_abort_transaction (3), rvm_end_transaction (3), and rvm_terminate (3)

AUTHOR
Hank Mashburn