rvm_modify_bytes(3)

NAME
rvm_modify_bytes - recoverable modifications to a segment

SYNOPSIS

#include "rvm.h"
rvm_return_t rvm_modify_bytes (tid,dest,src,length)
rvm_tid_t     *tid;    /* pointer to transaction identifier */
char          *dest;   /* base address of modification range */
char          *src;    /* base address of source range */
unsigned long length;  /* number of bytes to modify */

DESCRIPTION
rvm_modify_bytes is used to modify recoverable memory in a transaction. The transaction must have been previously initiated with rvm_begin_transaction; otherwise RVM_ETID is returned. The modification range is specified with the dest and length parameters, and must be in valid virtual memory or RVM_ERANGE is returned. The source of new values is specified with src, and must be in valid virtual memory or RVM_ESRC is returned. The range must also be within a single mapped region specified by the region parameter, or RVM_ENOT_MAPPED is returned. A range of zero length is ignored. Modification of different mapped regions in successive rvm_modify_bytes calls is permitted. Modifications can also be made with rvm_set_range, and both can be used in the same transaction as is convenient to the programmer. The modifications in virtual memory are visible to the program when the call returns. If the transaction was begun with the no_restore mode, no old value records will be created for the modification range, and an abort will not restore the state of virtual memory. If memory to create an old value record for the range cannot be allocated, RVM_ENO_MEMORY is returned.

DIAGNOSTICS

RVM_SUCCESS
    success

RVM_ETID
    invalid transaction identifier or pointer

RVM_ENOT_MAPPED
    virtual memory range not mapped

RVM_ESRC
    invalid addrss range for new values

RVM_ERANGE
    invalide virtual memory range

RVM_ENO_MEMORY
    heap exhausted

RVM_EINIT
    RVM not initialized

SEE ALSO
rvm_begin_transaction (3), rvm_set_range (3), rvm_abort_transaction (3), and rvm_end_transaction (3)

AUTHOR
Hank Mashburn