[Digital logo]
[HR]

OpenVMS System Services Reference Manual


Previous | Contents

All global page frame sections are permanent. Pages mapped to a global page frame section are not included in or charged against the process's working set; they are always valid. Do not lock these pages in the working set by using $LKWSET; this can result in a machine check if they are in I/O space.

If the condition value SS$_ACCVIO is returned by this service, a value cannot be returned in the memory locations pointed to by the return_va_64 and return_length_64 arguments.

If a condition value other than SS$_ACCVIO is returned, the returned address and returned length indicate the pages that were successfully mapped before the error occurred. If no pages were mapped, the return_va_64 argument will contain the value --1, and a value cannot be returned in the memory location pointed to by the return_length_64 argument.

Required Privileges

In order to create a global page frame section, the process must have the following privileges:

Required Quota

The working set quota (WSQUOTA) of the process must be sufficient to accommodate the increased length of the process page table required by the increase in virtual address space.

Related Services

$CREATE_GPFN, $CREATE_REGION_64, $CRMPSC, $CRMPSC_FILE_64, $CRMPSC_GFILE_64, $CRMPSC_GPFILE_64, $CRMPSC_PFN_64, $DELETE_REGION_64, $DELTVA_64, $DGBLSC, $MGBLSC_GPFN_64


Condition Values Returned

SS$_NORMAL The service completed successfully. The specified global section already exists and has been mapped.
SS$_CREATED The service completed successfully. The specified global section did not previously exist and has been created.
SS$_ACCVIO The gs_name_64 argument cannot be read by the caller, or the return_va_64 or return_length_64 argument cannot be written by the caller.
SS$_EXBYTLM The process has exceeded the byte count quota.
SS$_GBLSEC_MISMATCH Global section type mismatch. The specified global section was found; however, it was not a global disk file section.
SS$_GPTFULL There is no more room in the system global page table to set up page table entries for the section.
SS$_GSDFULL There is no more room in the system space allocated to maintain control information for global sections.
SS$_ILLRELPAG The specified relative page argument is either larger than the highest page number within the section or is not a valid 32-bit physical page frame number.
SS$_IVACMODE The caller's mode is less privileged than the create mode associated with the region.
SS$_IVLOGNAM The specified global section name has a length of 0 or has more than 43 characters.
SS$_IVREGID Invalid region ID specified.
SS$_IVSECFLG An invalid flag, a reserved flag, or an invalid combination of flags and arguments was specified.
SS$_IVSECIDCTL The match control field of the global section identification is invalid.
SS$_NOPFNMAP The process does not have the privilege to create or delete a section starting at a specific physical page frame number (PFNMAP).
SS$_NOPRMGBL The process does not have the privileges to create or delete a permanent group global section (PRMGBL).
SS$_NOSHPTS A virtual address within a shared page-table region was specified, or the region ID of a shared page-table region was specified.
SS$_NOSYSGBL The process does not have the privileges to create or delete a system global section (SYSGBL).
SS$_NOWRTACC The specified global section is not copy-on-reference and does not allow write access.
SS$_PAGNOTINREG A page in the specified range is not within the specified region.
SS$_REGISFULL The specified virtual region is full; no space is available in the region for the pages created to contain the mapped section.
SS$_TOOMANYLNAM The logical name translation of the gs_name_64 argument exceeded the allowed depth of 10.
SS$_VA_IN_USE A page in the specified input address range is already mapped, and the flag SEC$M_NO_OVERMAP is set.
SS$_VA_NOTPAGALGN The start_va_64 argument is not CPU-specific page-aligned.

$CRMPSC_PFN_64 (Alpha Only)

On Alpha systems, allows a process to map a section of its address space to a specified physical address range represented by page frame numbers. This service creates and maps a private page frame section.

This service accepts 64-bit addresses.


Format

SYS$CRMPSC_PFN_64 region_id_64 ,start_pfn ,page_count ,acmode ,flags ,return_va_64 ,return_length_64 [,start_va_64]


C Prototype

int sys$crmpsc_pfn_64 (struct _generic_64 *region_id_64, unsigned int start_pfn, unsigned int page_count, unsigned int acmode, unsigned int flags, void *(*(return_va_64)), unsigned __int64 *return_length_64,...);


ARGUMENTS

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 to map the private page frame section. 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_pfn


OpenVMS usage: page frame number
type: longword (unsigned)
access: read only
mechanism: by value

The CPU-specific page frame number where the section begins in memory.

page_count


OpenVMS usage: CPU-specific page count
type: longword (unsigned)
access: read only
mechanism: by value

Length of the page frame section in CPU-specific pages.

acmode


OpenVMS usage: access_mode
type: longword (unsigned)
access: read only
mechanism: by value

Access mode that is to be the owner of the pages created during the mapping. The acmode argument is a longword containing the access mode.

The $PSLDEF macro in STARLET.MLB and the file PSLDEF.H in SYS$STARLET_C.TLB define the following symbols and their values for the four access modes:
Value Symbolic Name Access Mode
0 PSL$C_KERNEL Kernel
1 PSL$C_EXEC Executive
2 PSL$C_SUPER Supervisor
3 PSL$C_USER User

The most privileged access mode used is the access mode of the caller. The calling process can delete pages only if those pages are owned by an access mode equal to or less privileged than the access mode of the calling process.

Address space cannot be created within a region that has a create mode associated with it that is more privileged than the caller's mode. The condition value SS$_IVACMODE is returned if the caller is less privileged than the create mode for the region.

flags


OpenVMS usage: mask_longword
type: longword (unsigned)
access: read only
mechanism: by value

Flag mask specifying the characteristics of the private section to be created. The flags argument is a longword bit vector in which each bit corresponds to a flag. The $SECDEF macro and the SECDEF.H file define a symbolic name for each flag. You construct the flags argument by performing a logical OR operation on the symbol names for all desired flags.

The following table describes each flag that is valid for the $CRMPSC_PFN_64 service:
Flag Description
SEC$M_EXPREG Pages are mapped into the first available space at the current end of the specified region.
SEC$M_NO_OVERMAP Pages cannot overmap existing address space. By default, pages can overmap existing address space.
SEC$M_PFNMAP Pages form a page frame section. By default, this flag is always present in this service and cannot be disabled.
SEC$M_WRT Pages form a read/write section. By default, pages form a read-only section.

All other bits in the flags argument are reserved for future use by Digital and should be specified as 0. The condition value SS$_IVSECFLG is returned if any undefined bits are set or if an invalid combination of flags is set.

return_va_64


OpenVMS usage: address
type: quadword address
access: write only
mechanism: by 32- or 64-bit reference

The lowest process virtual address into which the private page frame section was mapped. The return_va_64 argument is the 32- or 64-bit virtual address of a naturally aligned quadword into which the service returns the virtual address.

return_length_64


OpenVMS usage: byte count
type: quadword (unsigned)
access: write only
mechanism: by 32- or 64-bit reference

The length of the virtual address range mapped. The return_length_64 argument is the 32- or 64-bit virtual address of a naturally aligned quadword into which the service returns the length of the virtual address range in bytes.

start_va_64


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

The starting virtual address to map the private page frame section. The specified virtual address must be a CPU-specific page aligned address. If the flag SEC$M_EXPREG is specified, the start_va_64 argument must not be specified or must be specified as 0. If SEC$M_EXPREG is set and the start_va_64 argument is non-zero, the condition value SS$_IVESCFLG is returned.

DESCRIPTION

The Create and Map Private Page Frame Section service allows a process to create a map to a private page frame section. Creating a private page frame section involves defining certain physical page numbers (PFNs) as a section. The section is mapped from a low address to a high address whether the section is mapped in a region that grows from low to high addresses or from high to low addresses.

All global page frame sections are permanent. Pages mapped by SEC$M_PFNMAP are not included in or charged against the process's working set; they are always valid. Do not lock these pages in the working set by using $LKWSET_64; this can result in a machine check if they are in I/O space.

If the condition value SS$_ACCVIO is returned by this service, a value cannot be returned in the memory locations pointed to by the return_va_64 and return_length_64 arguments.

If a condition value other than SS$_ACCVIO is returned, the returned address and returned length indicate the pages that were successfully mapped before the error occurred. If no pages were mapped, the return_va_64 argument will contain the value --1, and a value cannot be returned in the memory location pointed to by the return_length_64 argument.

Required Privileges

PFNMAP privilege is required to create a page frame section.

Required Quota

The working set quota (WSQUOTA) of the process must be sufficient to accommodate the increased length of the process page table required by the increase in virtual address space.

Related Services

$CREATE_REGION_64, $CRMPSC, $CRMPSC_FILE_64, $CRMPSC_GFILE_64, $CRMPSC_GPFILE_64, $CRMPSC_GPFN_64, $DELETE_REGION_64, $DELTVA_64


Condition Values Returned

SS$_NORMAL The service completed successfully.
SS$_ACCVIO The return_va_64 argument or the return_length_64 argument cannot be written by the caller.
SS$_INSFWSL The process's working set limit is not large enough to accommodate the increased virtual address space.
SS$_IVACMODE The caller's mode is less privileged than the create mode associated with the region.
SS$_IVREGID Invalid region ID specified.
SS$_IVSECFLG An invalid flag, a reserved flag, or an invalid combination of flags and arguments was specified.
SS$_NOPFNMAP The process does not have the privilege to create a section starting at a specific physical page frame number (PFNMAP).
SS$_NOSHPTS The region ID of a shared page table region was specified.
SS$_PAGNOTINREG A page in the specified range is not within the specified region.
SS$_PAGOWNVIO A page in the specified input address range is owned by a more privileged access mode.
SS$_REGISFULL The specified virtual region is full; no space is available in the region for the pages created to contain the mapped section.
SS$_VA_IN_USE A page in the specified input address range is already mapped, and the flag SEC$M_NO_OVERMAP is set.
SS$_VA_NOTPAGALGN The start_va_64 argument is not CPU-specific page aligned.

$DACEFC

Releases the calling process's association with a common event flag cluster.

Format

SYS$DACEFC efn


C Prototype

int sys$dacefc (unsigned int efn);


ARGUMENT

efn


OpenVMS usage: ef_number
type: longword (unsigned)
access: read only
mechanism: by value

Number of any event flag in the common cluster to be disassociated. The efn argument is a longword containing this number; however, $DACEFC uses only the low-order byte. The number must be in the range of 64 through 95 for cluster 2, and 96 through 127 for cluster 3.

DESCRIPTION

The Disassociate Common Event Flag Cluster service disassociates the calling process from a common event flag cluster and decreases the count of processes associated with the cluster accordingly. When the image associated with a cluster exits, the system disassociates the cluster. When the count of processes associated with a temporary cluster or with a permanent cluster that is marked for deletion reaches 0, the cluster is automatically deleted.

If a process issues this service specifying an event flag cluster with which it is not associated, the service completes successfully.

Required Access or Privileges

A calling process must have PRMCEB privilege to delete a permanent common event flag cluster.

Required Quota

None

Related Services

$ASCEFC, $CLREF, $DLCEFC, $READEF, $SETEF, $WAITFR, $WFLAND, $WFLOR


Condition Values Returned

SS$_NORMAL The service completed successfully.
SS$_ILLEFC You specified an illegal event flag number. The number must be in the range of event flags 64 through 127.
SS$_INTERLOCK The bit map lock for allocating common event flag clusters from the specified shared memory is locked by another process.

$DALLOC

Deallocates a previously allocated device.

Format

SYS$DALLOC [devnam] ,[acmode]


C Prototype

int sys$dalloc (void *devnam, unsigned int acmode);


ARGUMENTS

devnam


OpenVMS usage: device_name
type: character-coded text string
access: read only
mechanism: by descriptor--fixed-length string descriptor

Name of the device to be deallocated. The devnam argument is the address of a character string descriptor pointing to the device name string. The string might be either a physical device name or a logical name. If it is a logical name, it must translate to a physical device name.

If you do not specify a device name, all devices allocated by the process from access modes equal to or less privileged than that specified are deallocated.

acmode


OpenVMS usage: access_mode
type: longword (unsigned)
access: read only
mechanism: by value

Access mode from which the deallocation is to be performed. The acmode argument is a longword containing the access mode. 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 most privileged access mode used is the access mode of the caller.


DESCRIPTION

The Deallocate Device service deallocates a previously allocated device. The issuing process relinquishes exclusive use of the device, thus allowing other processes to assign or allocate that device. You can deallocate an allocated device only from access modes equal to or more privileged than the access mode from which the original allocation was made.

This service does not deallocate a device if, at the time of deallocation, the issuing process has one or more I/O channels assigned to the device; in such a case, the device remains allocated.

At image exit, the system automatically deallocates all devices that are allocated at user mode.

If you attempt to deallocate a mailbox, success is returned but no operation is performed.

Required Access or Privileges

None

Required Quota

None

Related Services

$ALLOC, $ASSIGN, $BRKTHRU, $BRKTHRUW, $CANCEL, $CREMBX, $DASSGN, $DELMBX, $DEVICE_SCAN, $DISMOU, $GETDVI, $GETDVIW, $GETMSG, $GETQUI, $GETQUIW, $INIT_VOL, $MOUNT, $PUTMSG, $QIO, $QIOW, $SNDERR, $SNDJBC, $SNDJBCW, $SNDOPR


Condition Values Returned

SS$_NORMAL The service completed successfully.
SS$_ACCVIO The device name string or string descriptor cannot be read by the caller.
SS$_DEVASSIGN The device cannot be deallocated because the process still has channels assigned to it.
SS$_DEVNOTALLOC The device is not allocated to the requesting process.
SS$_IVDEVNAM You did not specify a device name string, or the device name string contains invalid characters.
SS$_IVLOGNAM The device name string has a length of 0 or has more than 63 characters.
SS$_NONLOCAL The device is on a remote node.
SS$_NOPRIV The device was allocated from a more privileged access mode.
SS$_NOSUCHDEV The specified device does not exist in the host system.

$DASSGN

Deassigns (releases) an I/O channel previously acquired using the Assign I/O Channel ($ASSIGN) service.

Format

SYS$DASSGN chan


C Prototype

int sys$dassgn (unsigned short int chan);


ARGUMENT

chan


OpenVMS usage: channel
type: word (unsigned)
access: read only
mechanism: by value

Number of the I/O channel to be deassigned. The chan argument is a word containing this number.

DESCRIPTION

The Deassign I/O Channel service deassigns (releases) an I/O channel that it acquired using the Assign I/O Channel ($ASSIGN) service. You can deassign an I/O channel only from an access mode equal to or more privileged than the access mode from which the original channel assignment was made.

When you deassign a channel, any outstanding I/O requests on the channel are canceled. If a file is open on the specified channel, the file is closed.

If a mailbox was associated with the device when the channel was assigned, the link to the mailbox is cleared.

If the I/O channel was assigned for a network operation, the network link is disconnected.

If the specified channel is the last channel assigned to a device that has been marked for dismounting, the device is dismounted.

I/O channels assigned from user mode are automatically deassigned at image exit.

Required Access or Privileges

None

Required Quota

None

Related Services

$ALLOC, $ASSIGN, $BRKTHRU, $BRKTHRUW, $CANCEL, $CREMBX, $DALLOC, $DELMBX, $DEVICE_SCAN, $DISMOU, $GETDVI, $GETDVIW, $GETMSG, $GETQUI, $GETQUIW, $INIT_VOL, $MOUNT, $PUTMSG, $QIO, $QIOW, $SNDERR, $SNDJBC, $SNDJBCW, $SNDOPR


Condition Values Returned

SS$_NORMAL The service completed successfully.
SS$_IVCHAN You specified an invalid channel number, that is, a channel number of 0 or a number larger than the number of channels available.
SS$_NOPRIV The specified channel is not assigned or was assigned from a more privileged access mode.

$DCLAST

Queues an asynchronous system trap (AST) for the calling access mode or for a less privileged access mode.

On Alpha systems, this service accepts 64-bit addresses.


Format

SYS$DCLAST astadr ,[astprm] ,[acmode]


C Prototype

int sys$dclast (void (*astadr)(__unknown_params), unsigned __int64 astprm, unsigned int acmode);


ARGUMENTS

astadr


OpenVMS usage: ast_procedure
type: procedure value
access: call without stack unwinding
mechanism: by 32- or 64-bit reference (Alpha)
mechanism: by 32-bit reference (VAX)

AST service routine to be executed. On Alpha systems, the astadr argument is the 32- or 64-bit address of this routine. On VAX systems, the astadr argument is the 32-bit address of this routine.

astprm


OpenVMS usage: user_arg
type: quadword (unsigned)
access: read only
mechanism: by 64-bit value (Alpha)
mechanism: by 32-bit value (VAX)

AST parameter to be passed to the AST routine specified by the astadr argument. On Alpha sytems, the astprm argument is a quadword value containing this parameter. On VAX systems, the astprm argument is a longword value containing this parameter.

acmode


OpenVMS usage: access_mode
type: longword (unsigned)
access: read only
mechanism: by value

Access mode for which the AST is to be declared. The most privileged access mode used is the access mode of the caller. The resultant mode is the access mode for which the AST is declared.

DESCRIPTION

The Declare AST service queues an AST for the calling access mode or for a less privileged access mode. For example, a routine executing in supervisor mode can declare an AST for either supervisor or user mode.


Previous | Next | Contents | [Home] | [Comments] | [Ordering info] | [Help]

[HR]

  4527P022.HTM
  OSSG Documentation
  22-NOV-1996 12:59:16.98

Copyright © Digital Equipment Corporation 1996. All Rights Reserved.

Legal