|
OpenVMS System Services Reference Manual
$SETAST
Enables or disables the delivery of asynchronous system traps (ASTs)
for the access mode from which the service call was issued.
Format
SYS$SETAST enbflg
C Prototype
int sys$setast (char enbflg);
Argument
enbflg
OpenVMS usage: |
boolean |
type: |
byte (unsigned) |
access: |
read only |
mechanism: |
by value |
Value specifying whether ASTs are to be enabled. The
enbflg argument is a byte containing this value. The
value 1 enables AST delivery for the calling access mode; the value 0
disables AST delivery.
Description
The Set AST Enable service enables or disables the delivery of ASTs for
the access mode from which the service call was issued.
Required Access or Privileges
When an image is executing in user mode, ASTs are always enabled for
more privileged access modes. If ASTs are disabled for a more
privileged access mode, the operating system cannot deliver ASTs for
less privileged access modes until ASTs are enabled once again for the
more privileged access mode. Therefore, a process that has disabled
ASTs for a more privileged access mode must reenable ASTs for that mode
before returning to a less privileged access mode.
Required Quota
None
Related Services
$DCLAST, $SETPRA
Condition Values Returned
SS$_WASCLR
|
The service completed successfully. AST delivery was previously
disabled for the calling access mode.
|
SS$_WASSET
|
The service completed successfully. AST delivery was previously enabled
for the calling access mode.
|
$SETCLUEVT
Establishes a request for notification when an OpenVMS Cluster
configuration event occurs.
Format
SYS$SETCLUEVT event ,astadr ,[astprm] ,[acmode] ,[handle]
C Prototype
int sys$setcluevt (unsigned int event, void
(*astadr)(__unknown_params), int astprm, unsigned int acmode, struct
_generic_64 *handle);
Arguments
event
OpenVMS usage: |
event_code |
type: |
longword (unsigned) |
access: |
read only |
mechanism: |
by value |
Event code indicating the type of cluster configuration event for which
an AST is to be delivered. The event argument is a
value indicating which type of event is of interest.
Each event type has a symbolic name. The $CLUEVTDEF macro defines the
following symbolic names:
Symbolic Name |
Description |
CLUEVT$C_ADD
|
One or more OpenVMS nodes have been added to the OpenVMS Cluster system.
|
CLUEVT$C_REMOVE
|
One or more OpenVMS nodes have been removed from the OpenVMS Cluster
system.
|
astadr
OpenVMS usage: |
ast_procedure |
type: |
procedure value |
access: |
call without stack unwinding |
mechanism: |
by reference |
Notification AST routine to receive control after a change in OpenVMS
Cluster configuration occurs.
astprm
OpenVMS usage: |
user_arg |
type: |
longword (unsigned) |
access: |
read only |
mechanism: |
by value |
Optional AST parameter to be passed to the AST service routine. The
astprm argument is a longword value containing the AST
parameter.
acmode
OpenVMS usage: |
access_mode |
type: |
longword (unsigned) |
access: |
read only |
mechanism: |
by value |
Optional access mode at which the configuration event AST is to
execute. The acmode argument is a longword containing
the access mode.
Each access mode has a symbolic name. The $PSLDEF macro defines the
following symbols for the four access modes:
Symbol |
Access Mode |
PSL$C_KERNEL
|
Kernel
|
PSL$C_EXEC
|
Executive
|
PSL$C_SUPER
|
Supervisor
|
PSL$C_USER
|
User
|
The value of the access mode must not be more privileged than the
access mode of the caller.
handle
OpenVMS usage: |
identifier |
type: |
quadword (unsigned) |
access: |
write only |
mechanism: |
by reference |
Optional identifier to receive a value that uniquely identifies this
AST request. $SETCLUEVT sets this handle to a unique value so that it
can later be used to identify the request in the $CLRCLUEVT and
$TSTCLUEVT services.
Description
The Set Cluster Event service establishes a request for notification
when a cluster configuration event occurs. The service establishes only
one AST notification for a configuration event. To receive AST
notification for all cluster configuration events, the $SETCLUEVT
service must be reissued within the notification AST routine.
The service will verify that the input parameters specify a valid
request, allocate appropriate data structures to hold the request, and
enqueue the request for notification.
You must specify an event type and an AST address. You can specify an
AST parameter, the access mode, and an address into which to place the
handle of this request.
Errors will be returned in the following cases:
- If quotas are exceeded, an error identifying the specific quota
will be returned. It is important to note that this routine will return
an error and will not retry an attempt to get quota if quota is
exhausted on the first attempt. See the Condition Values Returned
section for types of errors that can be returned.
- If the astadr argument is omitted, SS$_BADPARAM
will be returned.
- If the event argument is omitted or incorrectly
specified, SS$_BADPARAM will be returned.
- If the access mode parameter is more privileged than the mode of
the caller, the mode of the caller will be used.
- If specified, the handle argument must be readable
and writable from the mode of the caller. SS$_ACCVIO is returned if
this is not the case.
Required Access or Privileges
None
Required Quota
None
Related Services
$CLRCLUEVT, $TSTCLUEVT
Condition Values Returned
SS$_NORMAL
|
The service completed successfully.
|
SS$_ACCVIO
|
Unable to process parameters for improper use.
|
SS$_BADPARAM
|
The event was improperly specified.
|
SS$_EXASTLM
|
The process exceeded its quota for outstanding AST requests.
|
SS$_INSFMEM
|
The system dynamic memory is insufficient to complete the service.
|
$SETDDIR
Allows you to read and change the default directory string for the
process.
Format
SYS$SETDDIR [new-dir-addr] ,[length-addr] ,[cur-dir-addr]
C Prototype
int sys$setddir (void *newdiraddr, unsigned short int *lengthaddr, void
*curdiraddr);
Arguments
new-dir-addr
OpenVMS usage: |
char_string |
type: |
character-coded text string |
access: |
read only |
mechanism: |
by descriptor--fixed-length string descriptor |
A descriptor of the new default directory. The
new-dir-addr argument is the address of the descriptor
that points to the buffer containing the new directory specification
that RMS will use to set the new process-default directory. If the
default directory is not to be changed, the value of the
new-dir-addr argument should be 0.
length-addr
OpenVMS usage: |
word_unsigned |
type: |
word (unsigned) |
access: |
write only |
mechanism: |
by reference |
A word that is to receive the length of the current default directory.
The length-addr argument is the address of the word
that will receive the length. If you do not want this value returned,
specify the value 0.
cur-dir-addr
OpenVMS usage: |
char_string |
type: |
character-coded text string |
access: |
write only |
mechanism: |
by descriptor--fixed-length string descriptor |
A descriptor of a buffer that is to receive the current default
directory string. The cur-dir-addr argument is the
address of the descriptor that points to the buffer area that is to
receive the current directory string.
Description
The Set Default Directory service allows you to read and change the
default directory string for the process. You should restore the
previous default directory string to its original state unless you want
the changed default directory string to last beyond the exit of your
image. The new directory name string is checked for correct syntax.
There is no predefined macro of the form $SETDDIR_G or $SETDDIR_S to
call this service.
On Alpha systems, the Set Default Directory service attempts to replace
the default directory string with a DID abbreviation if the length of
the resulting default directory exceeds 255 characters. If this
happens, then in addition to the normal syntax check, the entire path
to that specification, including the device, is verified and must exist
for the call to succeed.
Required Access or Privileges
None
Required Quota
None
Related Services
$ALLOC, $ASSIGN, $BRKTHRU, $BRKTHRUW, $CANCEL, $CREMBX, $DALLOC,
$DASSGN, $DELMBX, $DEVICE_SCAN, $DISMOU, $GETDVI, $GETDVIW, $GETMSG,
$GETQUI, $GETQUIW, $INIT_VOL, $MOUNT, $PUTMSG, $QIO, $QIOW, $SNDERR,
$SNDJBC, $SNDJBCW, $SNDOPR
Condition Values Returned
RMS$_NORMAL
|
The service completed successfully.
|
RMS$_DIR
|
The directory name contains an error.
|
RMS$_IAL
|
The argument list is invalid.
|
$SETDFPROT
Allows you to read and write the default file protection for the
process.
Format
SYS$SETDFPROT [new-def-prot-addr] ,[cur-def-prot-addr]
C Prototype
int sys$setdfprot (unsigned short int *newdefprotaddr, unsigned short
int *curdefprotaddr);
Arguments
new-def-prot-addr
OpenVMS usage: |
file_protection |
type: |
word (unsigned) |
access: |
read only |
mechanism: |
by reference |
A word that specifies the new default file protection specification.
The new-def-prot-addr argument is the address of the
word that specifies the desired protection. If you do not want the
process-default file protection to be changed, specify the value 0.
cur-def-prot-addr
OpenVMS usage: |
file_protection |
type: |
word (unsigned) |
access: |
write only |
mechanism: |
by reference |
A word that is to receive the current default file protection
specification. The cur-def-prot-addr argument is the
address of the word that receives the current process-default
protection. If you do not want the current default file protection,
specify the value 0.
Description
The Set Default File Protection service allows you to read and write
the default file protection for the process. You should restore the old
default file protection specification unless you want the changed
default to last beyond the exit of your image.
There is no predefined macro of the form $SETDEFPROT_G or $SETDEFPROT_S
to call this service.
Required Access or Privileges
None
Required Quota
None
Related Services
$ALLOC, $ASSIGN, $BRKTHRU, $BRKTHRUW, $CANCEL, $CREMBX, $DALLOC,
$DASSGN, $DELMBX, $DEVICE_SCAN, $DISMOU, $GETDVI, $GETDVIW, $GETMSG,
$GETQUI, $GETQUIW, $GET_SECURITY, $INIT_VOL, $MOUNT, $PUTMSG, $QIO,
$QIOW, $SET_SECURITY, $SNDERR, $SNDJBC, $SNDJBCW, $SNDOPR
Condition Values Returned
RMS$_NORMAL
|
The service completed successfully.
|
RMS$_IAL
|
The argument list is invalid.
|
$SETEF
Sets an event flag in a local or common event flag cluster. The
condition value returned by $SETEF indicates whether the specified flag
was previously set or clear. After the event flag is set, processes
waiting for the event flag to be set resume execution.
Format
SYS$SETEF efn
C Prototype
int sys$setef (unsigned int efn);
Argument
efn
OpenVMS usage: |
ef_number |
type: |
longword (unsigned) |
access: |
read only |
mechanism: |
by value |
Number of the event flag to be set. The efn argument
is a longword containing this number; however, $SETEF uses only the
low-order byte.
Two local event flag clusters are local to the process: cluster 0 and
cluster 1. Cluster 0 contains event flag numbers 0 to 31, and cluster 1
contains event flag numbers 32 to 63.
There are two common event flag clusters: cluster 2 and cluster 3.
Cluster 2 contains event flag numbers 64 to 95, and cluster 3 contains
event flag numbers 96 to 127.
Condition Values Returned
SS$_WASCLR
|
The service completed successfully. The specified event flag was
previously 0.
|
SS$_WASSET
|
The service completed successfully. The specified event flag was
previously 1.
|
SS$_ILLEFC
|
You specified an illegal event flag number.
|
SS$_UNASEFC
|
The process is not associated with the cluster containing the specified
event flag.
|
$SETEXV
Assigns a condition handler address to the primary, secondary, or last
chance exception vectors, or removes a previously assigned handler
address from any of these three vectors.
Format
SYS$SETEXV [vector] ,[addres] ,[acmode] ,[prvhnd]
C Prototype
int sys$setexv (unsigned int vector, int (*addres)(__unknown_params),
unsigned int acmode, void *(*(prvhnd)));
Arguments
vector
OpenVMS usage: |
longword_unsigned |
type: |
longword (unsigned) |
access: |
read only |
mechanism: |
by value |
Vector for which a condition handler is to be established or removed.
The vector argument is a longword value. The value 0
(the default) specifies the primary exception vector; the value 1, the
secondary vector; and the value 2, the last chance exception vector.
addres
OpenVMS usage: |
procedure |
type: |
procedure value |
access: |
call without stack unwinding |
mechanism: |
by reference |
Condition handler address to be established for the exception vector
specified by the vector argument. The
addres argument is a longword value containing the
address of the condition handler routine.
If you do not specify addres or specify it as the
value 0, the condition handler address already established for the
specified vector is removed; that is, the contents of the longword
vector is set to 0.
acmode
OpenVMS usage: |
access_mode |
type: |
longword (unsigned) |
access: |
read only |
mechanism: |
by value |
Access mode for which the exception vector is to be modified. The
acmode argument is a longword containing the access
mode. The $PSLDEF macro defines symbols for the four access modes.
The most privileged access mode used is the access mode of the caller.
Exception vectors for access modes more privileged than the caller's
access mode cannot be modified.
prvhnd
OpenVMS usage: |
procedure value |
type: |
longword (unsigned) |
access: |
write only |
mechanism: |
by reference |
Previous condition handler address contained by the specified exception
vector. The prvhnd argument is the address of a
longword into which $SETEXV writes the handler's procedure value.
Description
The Set Exception Vector service (1) assigns a condition handler
address to the primary, secondary, or last chance exception vectors or
(2) removes a previously assigned handler address from any of these
three vectors. A process cannot modify a vector associated with a more
privileged access mode.
The operating system provides two different methods for establishing
condition handlers:
- Using the call stack associated with each access mode. Each call
frame includes a longword to contain the address of a condition handler
associated with that frame.
- On VAX systems, the RTL routine LIB$ESTABLISH establishes a
condition handler; the RTL routine LIB$REVERT removes a handler.
- Using the software exception vectors (by using $SETEXV) associated
with each access mode. These vectors are set aside in the control
region (P1 space) of the process.
The modular properties associated with the first method do not apply to
the second. The software exception vectors are intended primarily for
performance monitors and debuggers. For example, the primary exception
vector and the last chance exception vector are used by the OpenVMS
Debugger for user mode access, and DCL uses the last chance exception
vector for supervisor mode access.
User mode exception vectors are canceled at image exit.
Required Access or Privileges
None
Required Quota
None
Related Services
$DCLCMH, $SETSFM, $UNWIND
Condition Values Returned
SS$_NORMAL
|
The service completed successfully.
|
SS$_ACCVIO
|
The longword to receive the previous contents of the vector cannot be
written by the caller.
|
|