next up previous contents index
Next: 16.8.17 amm_protect: Modify the Up: 16.8 API reference Previous: 16.8.15 amm_join_func: Join two

16.8.16 amm_modify: Modify the attributes of an address range

 

SYNOPSIS

#include <oskit/amm.h>

int amm_modify(amm_t *amm, oskit_addr_t addr, oskit_size_t size, int flags, amm_entry_t *entry);

DESCRIPTION

Creates a new map entry in amm describing the range [addr - addr+size-1] with the attributes indicated in flags.

Any existing map entries wholly within the range are deleted, any that partly overlap the range are split as necessary. After adding the new entry, the AMM may attempt to join it with adjacent already-existing entries if the flag words are compatible.

If entry is zero, a standard amm_entry_t structure is allocated for the new range. If entry is non-zero, the caller must have already allocated and initialized any extra attribute data in the extended entry. In either case, the AMM will initialize the private part of the new entry, including setting its attribute flags to flags.

PARAMETERS

amm
A pointer to the amm_t structure representing the address map.
addr
Start address of the range being modified.
size
Size of the range being modified.
flags
New attributes for the range being modified.
entry
If non-zero, the entry structure to use in the map.

RETURNS

Returns zero if the modification was successful, non-zero if an entry split failed.

RELATED INFORMATION

amm_alloc_func, amm_free_func, amm_join_func, amm_split_func



University of Utah Flux Research Group