VMS Help
System Services, $SETFLT
*Conan The Librarian
|
On Alpha and Integrity server systems, allows a process to change
the fault characteristic on a page or range of pages.
Format
SYS$SETFLT inadr ,[retadr] ,[acmode] ,fault_flag
C Prototype
int sys$setflt (struct _va_range *inadr, struct _va_range
*retadr, unsigned int acmode, unsigned int
fault_flag);
inadr
OpenVMS usage:address_range
type: longword (unsigned)
access: read only
mechanism: by reference
Starting and ending virtual addresses of the range of pages whose
fault characteristic is to be changed. The inadr argument is the
address of a 2-longword array containing, in order, the starting
and ending process virtual addresses.
Addresses are adjusted up or down to fall on CPU-specific page
boundaries. Only the virtual page number portion of each virtual
address is used; the low-order byte-within-page bits are ignored.
If the starting and ending virtual addresses are the same, the
fault characteristic is changed for a single page.
retadr
OpenVMS usage:address_range
type: longword (unsigned)
access: write only
mechanism: by reference-array reference or descriptor
Starting and ending virtual addresses of the range of pages whose
fault characteristic was actually changed by $SETFLT. The retadr
argument is the address of a 2-longword array containing, in
order, the starting and ending process virtual addresses.
If an error occurs while the fault characteristic is being
changed, $SETFLT writes into retadr the range of pages that were
successfully changed before the error occurred. If no pages were
affected before the error occurred, $SETFLT writes the value -1
into each longword of the 2-longword array.
acmode
OpenVMS usage:access_mode
type: longword (unsigned)
access: read only
mechanism: by value
Access mode associated with the call to $SETFLT. The acmode
argument is a longword containing the access mode. The $PSLDEF
macro defines symbols for the access modes.
The $SETFLT service uses whichever of the following two access
modes is less privileged: (1) the access mode specified by
acmode or (2) the access mode of the caller. To change the fault
characteristic of any page in the specified range, the resultant
access mode must be equal to or more privileged than the access
mode of the owner of that page.
fault_flag
OpenVMS usage:mask_longword
type: longword (unsigned)
access: read only
mechanism: by value
Flag mask specifying the request options. The fault_flag argument
is a longword bit vector in which each bit corresponds to a flag.
The $FLTDEF macro and the FLTDEF.H file define a symbolic name
for each flag.
The $FLTDEF macro defines the following symbolic names for the
fault characteristic codes:
Symbol Description
FLT$M_NO_EXECUTE Fault on execute access attempt
FLT$M_EXECUTABLE Allow execute access
If you specify the fault characteristic as the value 0, the
characteristic defaults to no execute access.