next up previous contents
Next: 5.10 fluke_mapping_set_state: set the Up: 5 Mappings Previous: 5.8 fluke_mapping_move: move a

5.9 fluke_mapping_protect: change the protection of an address mapping

SYNOPSIS

void fluke_mapping_protect(fluke_mapping_t *mapping, fluke_prot_t prot);

DESCRIPTION

Attempts to change the protections of all pages covered by the specified mapping in the mapping's associated task. The actual access permission used is the lesser of the provided protection value and the maximum protection value of the associated region.

Depending on the Fluke implementation, fluke_mapping_protect may affect only the address space of the task associated with the mapping object or it may also affect all descendent mappings.

Note that this function is semantically equivalent to doing fluke_mapping_get_state, changing the protection field of the state and then calling fluke_mapping_set_state.

PARAMETERS

mapping
The mapping object whose protection is being changed.
prot
The permissions desired for the current mapping.

ERRORS

If any of the following errors is detected by the Fluke implementation, it causes the current thread to take a synchronous exception with one of the following codes. All of these have an implicit FLUKE_INSANITY_ prefix.
NO_OBJECT
mapping does not point to an active object.
NOT_MAPPING
The object pointed to by mapping is not a mapping object.
INVALID_OBJECT
The state of the mapping object has become invalid.
INVALID_PROT
The requested protection, prot, was invalid.

RELATED INFORMATION

fluke_mapping_get_state, fluke_mapping_set_state, fluke_region_protect, POSIX.1b mprotect



Utah Flux Research Group