next up previous contents index
Next: 16.8.18 amm_reserve: Mark as Up: 16.8 API reference Previous: 16.8.16 amm_modify: Modify the

16.8.17 amm_protect: Modify the attribute flags of an address range in an AMM (simple interface)

 

SYNOPSIS

#include <oskit/amm.h>

int amm_protect(amm_t *amm, oskit_addr_t addr, oskit_size_t size, int prot);

DESCRIPTION

Modifies the attribute flags associated with with all AMM_ALLOCATED entries within the specified address range. The resulting attributes are AMM_ALLOCATED|prot. AMM_RESERVED and AMM_FREE areas within the range are ignored.

Amm_Protect is a simplified interface to amm_modify intended to be used with amm_init, amm_allocate, amm_deallocate, and amm_reserve.

PARAMETERS

amm
A pointer to the amm_t structure representing the address map.
addr
Start address of the desired range.
size
Size of the desired range.
prot
New attribute flags to associate with the range.

RETURNS

Returns zero if successful, an error code otherwise.

RELATED INFORMATION

amm_allocate, amm_deallocate, amm_init, amm_modify, amm_reserve



University of Utah Flux Research Group