Document revision date: 30 March 2001

## OpenVMS System Services Reference Manual

Previous | Contents | Index

## $GET_ARITH_EXCEPTION (Alpha Only)

> On Alpha systems, returns information about the exception context for a given arithmetic exception.

### Format

> SYS$GET_ARITH_EXCEPTION sigarg ,mcharg ,buffer

### C Prototype

> int sys$get_arith_exception (void *sigarg, void *mcharg, void *buffer);

### Arguments

> #### sigarg

> OpenVMS usage: | signal array
> type: | vector_longword_signed
> access: | read only
> mechanism: | by reference

> Address of the signal array for the given arithmetic exception.

> #### mcharg

> OpenVMS usage: | mech array
> type: | vector_quadword_unsigned
> access: | read only
> mechanism: | by reference

> Address of the mechanism array for the given arithmetic exception.

> #### buffer

> OpenVMS usage: | vector_quadword
> type: | vector_quadword_unsigned
> access: | write only
> mechanism: | by descriptor

> Four-quadword buffer to receive additional exception context. The buffer argument is the address of a descriptor that points to this buffer.

### Description

> The Get Arithmetic Exception Information service returns, to the buffer specified by the buffer argument, the following information for a given arithmetic exception in an array of quadwords:
> - First quadword, the PC of the triggering instruction in the trap shadow
> - Second quadword, a copy of the triggering instruction
> - Third quadword, the exception summary
> - Fourth quadword, the register write mask

> Required Access or Privilege

> None

> Required Quota

> None

### Condition Values Returned

> SS$_NORMAL | The service completed successfully.
> SS$_ACCVIO | The specified buffer cannot be written.
> SS$_BADBUFLEN | The specified buffer length is invalid or out of range.

## $GET_GALAXY_LOCK_INFO (Alpha Only)

> Returns "interesting" fields from the specified lock.

> Note that this system service is supported only in an OpenVMS Alpha Galaxy environment. For more information about programming with OpenVMS Galaxy system services, refer to the OpenVMS Alpha Partitioning and Galaxy Guide.

### Format

> SYS$GET_GALAXY_LOCK_INFO handle ,name ,timeout ,size ,ipl ,rank ,flags [,name_length]

### C Prototype

> int sys$get_galaxy_lock_info (unsigned __int64 lock_handle, char *name, unsigned int *timeout, unsigned int *size, unsigned int *ipl, unsigned int *rank, unsigned short int *flags unsigned short int *name_length);

### Arguments

> #### handle

> OpenVMS usage: | handle for the galaxy lock
> type: | quadword (unsigned)
> access: | read
> mechanism: | input by value

> The 64-bit lock handle that identifies the lock on which to return information. This value is returned by SYS$CREATE_GALAXY_LOCK.

> #### name

> OpenVMS usage: | address
> type: | zero-terminated string
> access: | write
> mechanism: | output by reference

> Pointer to a buffer. This buffer must be large enough to receive the name of the lock. Locks names are zero-terminated strings with a maximum size of 16 bytes.

> #### timeout

> OpenVMS usage: | address
> type: | longword (unsigned)
> access: | write
> mechanism: | output by reference

> Pointer to a longword. The value returned is the timeout value of the lock.

> #### size

> OpenVMS usage: | address
> type: | longword (unsigned)
> access: | write
> mechanism: | output by reference

> Pointer to a longword. The value returned is the size of the lock in bytes.

> #### ipl

> OpenVMS usage: | address
> type: | longword (unsigned)
> access: | write
> mechanism: | output by reference

> Pointer to a longword. The value returned is the IPL of the lock.

> #### rank

> OpenVMS usage: | address
> type: | longword (unsigned)
> access: | write
> mechanism: | output by reference

> Pointer to a longword. The value returned is the rank of the lock.

> #### flags

> OpenVMS usage: | address
> type: | word (unsigned)
> access: | write
> mechanism: | output by reference

> Pointer to a word. The value returned is the word mask of lock flags.

> #### name_length

> OpenVMS usage: | address
> type: | word (unsigned)
> access: | write
> mechanism: | output by reference

> Length of the string returned in the name argument.

### Description

> This service returns all "interesting" fields from the specified lock. See the $CREATE_GALAXY_LOCK service for detailed information regarding these values.

> Required Access or Privileges

> Read access to lock.

> Required Quota

> None

> Related Services

> $ACQUIRE_GALAXY_LOCK, $CREATE_GALAXY_LOCK, $CREATE_GALAXY_LOCK_TABLE, $DELETE_GALAXY_LOCK, $DELETE_GALAXY_LOCK_TABLE, $GET_GALAXY_LOCK_SIZE, $RELEASE_GALAXY_LOCK

### Condition Values Returned

> SS$_NORMAL | Normal completion.
> SS$_IVLOCKID | Invalid lock id.
> SS$_IVLOCKTBL | Invalid lock table.

## $GET_GALAXY_LOCK_SIZE (Alpha Only)

> Returns the minimum and maximum size of an OpenVMS Galaxy lock.

> Note that this system service is supported only in an OpenVMS Alpha Galaxy environment.

> For more information about programming with OpenVMS Galaxy system services, refer to the OpenVMS Alpha Partitioning and Galaxy Guide.

### Format

> SYS$GET_GALAXY_LOCK_SIZE min_size ,max_size

### C Prototype

> int sys$get_galaxy_lock_size (unsigned int *min_size, unsigned int *max_size);

### Arguments

> #### min_size

> OpenVMS usage: | address
> type: | longword (unsigned)
> access: | write
> mechanism: | output by reference

> Pointer to a longword. The value returned is minimum legal size of a galaxy lock structure.

> #### max_size

> OpenVMS usage: | address
> type: | longword (unsigned)
> access: | write
> mechanism: | output by reference

> Pointer to a longword. The value returned is maximum legal size of a galaxy lock structure.

### Description

> This service returns the minimum and maximum size of an OpenVMS Galaxy lock. If a lock is created with the maximum size, the locking services will record acquire and release information in the lock.

> The lock sizes can be used to determine the value of the section_size parameter to the $CREATE_GALAXY_LOCK_TABLE service.

> Required Access or Privileges

> Read access to lock.

> Required Quota

> None

> Related Services

> $ACQUIRE_GALAXY_LOCK, $CREATE_GALAXY_LOCK, $CREATE_GALAXY_LOCK_TABLE, $DELETE_GALAXY_LOCK, $DELETE_GALAXY_LOCK_TABLE, $GET_GALAXY_LOCK_INFO, $RELEASE_GALAXY_LOCK

### Condition Values Returned

> SS$_NORMAL | Normal completion.

## $GET_REGION_INFO (Alpha Only)

> On Alpha systems, gets information about a specified virtual region.

> This service accepts 64-bit addresses.

### Format

> SYS$GET_REGION_INFO function_code ,region_id_64 ,start_va_64 ,nullarg ,buffer_length ,buffer_address_64 ,return_length_64

### C Prototype

> int sys$get_region_info (unsigned int function_code, struct _generic_64 *region_id_64, void *start_va_64, void *reserved, unsigned int buffer_length, void *buffer_address_64, unsigned int *return_length_64);

### Arguments

> #### function_code

> OpenVMS usage: | function code
> type: | longword (unsigned)
> access: | read only
> mechanism: | by value

> Function code specifying how the information you are requesting should be looked up. All function codes return region summary information in the return buffer in the format of the Region Summary Buffer. The Region Summary Buffer format is shown in the table in the buffer_address_64 argument.

> If less buffer space is specified than the length of the Region Summary Buffer, only the amount of information requested is returned. If more buffer space is specified than the length of the Region Summary Buffer, the service will fill in the buffer. The return length will reflect the amount of useful information written to the buffer, the size of the Region Summary Buffer.

> The file VADEF.H in SYS$STARLET_C.TLB and the $VADEF macro in STARLET.MLB define a symbolic name for each function code.

> The following function codes are defined:

> Symbolic Name | Description
> --- | ---
> VA$_REGSUM_BY_ID | Return the region summary information for the region whose ID is specified in the region_id_64 argument.
> VA$_REGSUM_BY_VA | Return the region summary information for the region that contains the virtual address specified in the start_va_64 argument.
> VA$_NEXT_REGSUM_BY_VA | Return the region summary information for the region containing the starting address. If the starting address is not in a region, return the region summary information for the next region with a starting address higher than the specified address. Note: For the VA$_NEXT_REGSUM_BY_VA function, OpenVMS checks for a start_va_64 argument in the inaccessible address range in P2 space. If it finds one, OpenVMS adjusts the address to account for the discontinuity. For more information about the layout of the 64-bit virtual address space, refer to the OpenVMS Programming Concepts Manual. This function code can be used for wildcard operations. See the description of the start_va_64 argument for information on how to program a wildcard operation on regions.

> #### region_id_64

> OpenVMS usage: | region identifier
> type: | quadword (unsigned)
> access: | read only
> mechanism: | by 32- or 64-bit reference

> The region ID associated with the region about which information is requested. This argument is read only if the function code VA$_REGSUM_BY_ID is specified.

> The file VADEF.H in SYS$STARLET_C.TLB and the $VADEF macro in STARLET.MLB define a symbolic name for each of the three default regions in P0, P1, and P2 space.

> The following region IDs are defined:

> Symbol | Region
> --- | ---
> VA$C_P0 | Program region
> VA$C_P1 | Control region
> VA$C_P2 | 64-bit program region

> Other region IDs, as returned by the $CREATE_REGION_64 service, can be specified.

> #### start_va_64

> OpenVMS usage: | input address
> type: | quadword address
> access: | read only
> mechanism: | by value

> Virtual address associated with region about which information is requested. This argument is read only if the function_code argument is VA$_REGSUM_BY_VA or VA$_NEXT_REGSUM_BY_VA.

> If the function_code argument is VA$_REGSUM_BY_VA, this argument is a virtual address within the region about which you are requesting information.

> To perform a wildcard search on all regions, specify VA$_NEXT_REGSUM_BY_VA as the function code and begin with the start_va_64 argument specified as -1. For subsequent calls, specify start_va_64 as the sum of the previous region's start address and length. Call the $GET_REGION_INFO service in a loop until the condition SS$_NOMOREREG is returned.

> Note Before performing the lookup function, OpenVMS sign-extends the 64-bit starting address so that it represents a properly formed virtual address for the CPU.

> #### nullarg

> OpenVMS usage: | null_arg
> type: | longword (unsigned)
> access: | read only
> mechanism: | by value

> Placeholding argument reserved to Compaq.

> #### buffer_length

> OpenVMS usage: | longword_unsigned
> type: | longword (unsigned)
> access: | read only
> mechanism: | by value

> Length of the buffer into which information is returned.

> #### buffer_address_64

> OpenVMS usage: | varying_arg
> type: | unspecified
> access: | write only
> mechanism: | by 32- or 64-bit reference

> The 32- or 64-bit virtual address of a quadword-aligned buffer into which to return information if the buffer_length argument is nonzero.

> This argument is ignored if the buffer_length argument is zero.

> Table SYS-14 shows the format of the Region Summary Buffer:

> Table SYS-14 Region Summary Buffer Format
> Field name | Meaning | Field Size (Bytes) | Field Offset (Decimal)
> --- | --- | --- | ---
> VA$L_FLAGS | Flags used when region was created | 4 | 8
> VA$L_REGION_PROTECT | Create and owner mode of region | 4 | 12
> VA$Q_REGION_ID | Region identifier | 8 | 0
> VA$PQ_START_VA | Starting (lowest) virtual address of region | 8 | 16
> VA$Q_REGION_SIZE | Total length of region | 8 | 24
> VA$PQ_FIRST_FREE_VA | First free virtual address in region | 8 | 32
> VA$C_REGSUM_LENGTH | Length of Region Summary Buffer | constant | 40

> The file VADEF.H in SYS$STARLET_C.TLB and the $VADEF MACRO in STARLET.MLB define the REGSUM structure.

> #### return_length_64

> OpenVMS usage: | longword_unsigned
> type: | longword (unsigned)
> access: | write only
> mechanism: | by 32- or 64-bit reference

> The 32- or 64-bit virtual address of a naturally aligned longword into which the service returns the length of the information in bytes.

### Description

> The Get Information About a Specified Virtual Region service is a kernel mode service that can be called from any mode. This service gets the requested information about the specified region or the next region in a wildcard search. If the returned value of this service is not a successful condition value, a value cannot be returned in the memory locations pointed to by the buffer_address_64 or return_length_64 arguments.

> Required Privileges

> None

> Required Quota

> None

> Related Services

> $CREATE_REGION_64, $DELETE_REGION_64

### Condition Values Returned

> SS$_NORMAL | The service completed successfully.
> SS$_ACCVIO | The buffer_address_64 argument or the return_length_64 argument cannot be written by the caller.
> SS$_BADPARAM | Unrecognized function code.
> SS$_IVREGID | Invalid region ID specified in conjunction with the VA$_REGSUM_BY_ID function code.
> SS$_NOMOREREG | No region at a higher address than specified in the start_va_64 argument, which was specified in conjunction with the wildcard function code VA$_NEXT_REGSUM_BY_VA.
> SS$_PAGNOTINREG | The value specified in the start_va_64 argument is not within a region and was specified in conjunction with the function code VA$_REGSUM_BY_VA.

## $GET_SECURITY

> Retrieves the security characteristics of an object.

### Format

> SYS$GET_SECURITY [clsnam] ,[objnam] ,[objhan] ,[flags] ,[itmlst] ,[contxt] ,[acmode]

### C Prototype

> int sys$get_security ( void *clsnam, void *objnam, unsigned int *objhan, unsigned int flags, void *itmlst, unsigned int *contxt, unsigned int *acmode);

### Arguments

> #### clsnam

> OpenVMS usage: | char_string
> type: | character-coded text string
> access: | read only
> mechanism: | by descriptor

> Name of the object class. The clsnam argument is the address of a descriptor pointing to a string containing the name of the object class.

> The following is a list of protected object class names:

> > CAPABILITY
> > COMMON_EVENT_CLUSTER
> > DEVICE
> > FILE
> > GLXSYS_GLOBAL_SECTION
> > GLXGRP_GLOBAL_SECTION
> > GROUP_GLOBAL_SECTION
> > ICC_ASSOCIATION
> > LOGICAL_NAME_TABLE
> > QUEUE
> > RESOURCE_DOMAIN
> > SECURITY_CLASS
> > SYSTEM_GLOBAL_SECTION
> > VOLUME

> #### objnam

> OpenVMS usage: | char_string
> type: | character-coded text string
> access: | read only
> mechanism: | by descriptor

> Name of the protected object whose associated security profile is going to be retrieved. The objnam argument is the address of a descriptor pointing to a string containing the name of the protected object.

> The format of an object name is class specific. The following table lists object names and describes their formats:

> Object Class | Object Name Format
> --- | ---
> CAPABILITY | A character string. Currently, the only capability object is VECTOR.
> COMMON_EVENT_CLUSTER | Name of the event flag cluster, as defined in the Associate Common Event Flag Cluster ($ASCEFC) system service.
> DEVICE | Standard device specification, described in the OpenVMS User's Manual.
> FILE | Standard file specification, described in the OpenVMS User's Manual.
> GROUP_GLOBAL_SECTION | Section name, as defined in the Create and Map Section ($CRMPSC) system service.
> ICC_ASSOCIATION | ICC security object name node::association_name. The special node name, ICC$::, refers to entries in the clusterwide registry. For registry entries, the Access Access Type does not apply.
> LOGICAL_NAME_TABLE | Table name, as defined in the Create Logical Name Table ($CRELNT) system service.
> QUEUE | Standard queue name, as described in the Send to Job Controller ($SNDJBC) system service.
> RESOURCE_DOMAIN | An identifier or octal string enclosed in brackets.
> SECURITY_CLASS | Any class name shown in column 1, or a class name followed by a period (.) and the template name. Use the DCL command SHOW SECURITY to display possible template names.
> SYSTEM_GLOBAL_SECTION | Section name, as defined in the Create and Map Section ($CRMPSC) system service.
> VOLUME | Volume name or name of the device on which the volume is mounted.

> #### objhan

> OpenVMS usage: | object_handle
> type: | longword (unsigned)
> access: | read only
> mechanism: | by reference

> Data structure identifying the object whose associated characteristics are going to be retrieved. The objhan argument is an address of a longword containing the object handle. You can use the objhan argument as an alternative to the objnam argument; for example, channel number clearly specifies the file open on the channel and can serve as an object handle.

> The following table shows the format of the object classes:

> Object Class | Object Handle Format
> --- | ---
> COMMON_EVENT_CLUSTER | Event flag number
> DEVICE | Channel number
> FILE | Channel number
> RESOURCE_DOMAIN | Resource domain identifier
> VOLUME | Channel number

> #### flags

> OpenVMS usage: | flags
> type: | mask_longword
> access: | read only
> mechanism: | by value

> Mask specifying processing options. The flags argument is a longword bit vector wherein a bit, when set, specifies the processing option. The flags argument requires the contxt argument.

> Previous | Next | Contents | Index

> | privacy and legal statement |
> 4527PRO_057.HTML