https://wiki.vmssoftware.com/index.php?title=$CRMPSC&feed=atom&action=history$CRMPSC - Revision history2024-03-29T11:34:16ZRevision history for this page on the wikiMediaWiki 1.31.0https://wiki.vmssoftware.com/index.php?title=$CRMPSC&diff=1558&oldid=prevJane.doe at 12:46, 28 November 20192019-11-28T12:46:19Z<p></p>
<table class="diff diff-contentalign-left" data-mw="interface">
<col class="diff-marker" />
<col class="diff-content" />
<col class="diff-marker" />
<col class="diff-content" />
<tr class="diff-title" lang="en">
<td colspan="2" style="background-color: #fff; color: #222; text-align: center;">← Older revision</td>
<td colspan="2" style="background-color: #fff; color: #222; text-align: center;">Revision as of 12:46, 28 November 2019</td>
</tr><tr><td colspan="2" class="diff-lineno" id="mw-diff-left-l538" >Line 538:</td>
<td colspan="2" class="diff-lineno">Line 538:</td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>* [[$UPDSEC]]</div></td><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>* [[$UPDSEC]]</div></td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>* [[$UPDSECW]]</div></td><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>* [[$UPDSECW]]</div></td></tr>
<tr><td colspan="2"> </td><td class='diff-marker'>+</td><td style="color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div><ins style="font-weight: bold; text-decoration: none;"></ins></div></td></tr>
<tr><td colspan="2"> </td><td class='diff-marker'>+</td><td style="color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div><ins style="font-weight: bold; text-decoration: none;">[[Category:System Services]]</ins></div></td></tr>
</table>Jane.doehttps://wiki.vmssoftware.com/index.php?title=$CRMPSC&diff=1174&oldid=prevDarya.zelenina: Created page with "'''$CRMPSC''' is a system service that allows a process to associate (map) a section of its address space with either a specified section of a file (a disk..."2019-07-10T07:06:01Z<p>Created page with "'''$CRMPSC''' is a <a href="/System_Service" title="System Service">system service</a> that allows a process to associate (map) a section of its address space with either a specified section of a file (a disk..."</p>
<p><b>New page</b></p><div>'''$CRMPSC''' is a [[System Service|system service]] that allows a process to associate (map) a section of its address space with either a specified section of a file (a disk file section) or specified physical addresses represented by page frame numbers (a page frame section). This service also allows the process to create either type of section and to specify that the section be available only to the creating process (private section) or to all processes that map to it (global section).<br />
<br />
The Create and Map Section service allows a process to associate (map) a section of its address space with ( 1 ) a specified section of a file (a disk file section) or ( 2 ) specified physical addresses represented by page frame numbers (a page frame section). This service also allows the process to create either type of section and to specify that the section be available only to the creating process (private section) or to all processes that map to it (global section).<br />
<br />
Creating a disk file section involves defining all or part of a disk file as a section. Mapping a disk file section involves making a correspondence between virtual blocks in the file and pagelets in the caller’s virtual address space. If the $CRMPSC service specifies a global section that already exists, the service maps it.<br />
<br />
Any section created is created as entire pages. See the memory management section in the [https://support.hpe.com/hpsc/doc/public/display?docId=emr_na-c04621447 OpenVMS Programming Concepts Manual].<br />
<br />
=Format=<br />
<nowiki>SYS$CRMPSC [</nowiki>[[#inadr|inadr]]<nowiki>] ,[</nowiki>[[#retadr|retadr]]<nowiki>] ,[</nowiki>[[#acmode|acmode]]<nowiki>] ,[</nowiki>[[#flags|flags]]<nowiki>] ,[</nowiki>[[#gsdnam|dsanam]]<nowiki>] ,[</nowiki>[[#ident|ident]]<nowiki>] ,[</nowiki>[[#relpag|relpag]]<nowiki>] ,[</nowiki>[[#chan|chan]]<nowiki>]<br />
,[</nowiki>[[#pagcnt|pagcnt]]<nowiki>] ,[</nowiki>[[#vbn|vbn]]<nowiki>] ,[</nowiki>[[#prot|prot]]<nowiki>] ,[</nowiki>[[#pfc|pfc]]<nowiki>]</nowiki><br />
<br />
C prototype:<br />
<br />
int sys$crmpsc (struct _va_range *inadr, struct _va_range *retadr, unsigned int<br />
acmode, unsigned int flags, void *gsdnam, unsigned int relpag,<br />
unsigned short int chan, unsigned int pagcnt, unsigned int vbn,<br />
unsigned int prot,unsigned int pfc);<br />
<br />
<br />
=Arguments=<br />
<br />
Depending on the actual operation requested, certain arguments are required or optional. [[#vbn|This table]] summarizes how the $CRMPSC service interprets the arguments passed to it and under what circumstances it requires or ignores arguments.<br />
<br />
The $CRMPSC service returns the virtual addresses of the virtual address space created in the retadr argument, if specified. The section is mapped from a low address to a high address, whether the section is mapped in the program or control region.<br />
<br />
If an error occurs during the mapping of a global section, the retadr argument, if specified, indicates the pages that were successfully mapped when the error occurred. If no pages were mapped, the value of the longwords is indeterminate.<br />
<br />
In this case, either both longwords of the retadr argument will contain the value –1, or the value of the longwords will be unaltered.<br />
<br />
The SEC$M_PFNMAP flag setting identifies the memory for the section as starting at the page frame number specified in the vbn argument and extending for the number of CPU-specific pages specified in the pagcnt argument. Setting the SEC$M_PFNMAP flag places restrictions on the following arguments:<br />
<br />
{| class="wikitable"<br />
! colspan="col" | Argument<br />
! colspan="col" | Restriction<br />
|-<br />
| chan<br />
| Must be 0<br />
|-<br />
| pagcnt<br />
| Must be specified; cannot be 0<br />
|-<br />
| vbn<br />
| Specifies first page frame to be mapped<br />
|-<br />
| pfc<br />
| Does not apply<br />
|-<br />
| SEC$M_CRF<br />
| Must be 0<br />
|-<br />
| SEC$M_DZRO<br />
| Must be 0<br />
|-<br />
| SEC$M_PERM<br />
| Must be 1 if the flags SEC$M_GBL or SEC$M_SYSGBL are set<br />
|}<br />
<br />
Setting the SEC$M_PAGFIL flag places the following restrictions on the following flags:<br />
<br />
{| class="wikitable"<br />
! colspan="col" | Flag<br />
! colspan="col" | Restriction<br />
|-<br />
| SEC$M_CRF <br />
| Must be 0<br />
|-<br />
| SEC$M_DZRO <br />
| Assumed to be 0<br />
|-<br />
| SEC$M_GBL <br />
| Must be 1<br />
|-<br />
| SEC$M_PFNMAP <br />
| Must be 0<br />
|-<br />
| SEC$M_WRT <br />
| Assumed to be 0<br />
|}<br />
<br />
The flags argument bits 4 through 13 and 18 through 31 must be 0.<br />
<br />
If the global section is mapped to a file (neither SEC$M_PAGFIL nor SEC$M_PFNMAP is set), the security profile of the file is used to determine access to the global section.<br />
<br />
On VAX systems, by default, the initial security profile created for a page file or PFN global section is taken from the group global section template. If the SEC$M_SYSGBL flag is set, the profile is taken from the system global section template. The owner is then set to the process UIC. If the prot argument is nonzero, it replaces the protection mask from the template.<br />
<br />
On Alpha or Integrity server systems , the flag bit SEC$M_WRT applies only to the way in which the newly created section is mapped. For a file to be made writable, the channel used to open the file must allow write access to the file. <br />
<br />
If the flag bit SEC$M_SYSGBL is set, the flag bit SEC$M_GBL must be set also.<br />
<br />
==inadr==<br />
{{SyservArgument|address_range|longword (unsigned)|read only|by reference}}<br />
<br />
Starting and ending virtual addresses into which the section is to be mapped. The inadr argument is the address of a 2-longword array containing, in order, the starting and ending process virtual addresses. Only the virtual page number portion of each virtual address is used to specify which pages are to be mapped; the low-order byte-within-page bits are ignored for this purpose.<br />
<br />
The interpretation of the inadr argument depends on the setting of SEC$M_EXPREG in the [[#flags|flags]] argument and on whether you are using an [[Alpha]], an [[Integrity]] servers or a [[VAX]] system. The two system types are discussed separately in this section.<br />
<br />
On Alpha and Integrity server systems, if you do not set the SEC$M_EXPREG flag, the inadr argument specifies the starting and ending virtual addresses of the region to be mapped. Addresses in system space are not allowed. The addresses must be aligned on CPU-specific pages; no rounding to CPU-specific pages occurs. The lower address of the inadr argument must be on a CPUspecific page boundary and the higher address of the inadr argument must be 1 less than a CPU-specific boundary, thus forming a range, from lowest to highest, of address bytes. You can use the SYI$_PAGE_SIZE item code in the [[$GETSYI]] system service to set the inadr argument to the proper values. You do this to avoid programming errors that might arise because of incorrect programming assumptions about page sizes.<br />
<br />
If, on the other hand, you do set the SEC$M_EXPREG flag, indicating that the mapping should take place using the first available space in a particular region, the inadr argument is used only to indicate the desired region: the program region (P0) or the control region (P1).<br />
<br />
Caution: mapping into the P1 region is generally discouraged, but, if done, must be executed with extreme care. Because the user stack is mapped in P1, it is possible that references to the user stack might inadvertently read or write the pages mapped with $CRMPSC.<br />
<br />
When the SEC$M_EXPREG flag is set, the second inadr longword is ignored, while bit 30 (the second most significant bit) of the first inadr longword is used to determine the region of choice. If the bit is clear, P0 is chosen; if the bit is set, P1 is chosen. On Alpha and Integrity server systems, bit 31 (the most significant bit) of the first inadr longword must be 0. To ensure compatibility between VAX and Alpha or Integrity server systems when you choose a region, VSI recommends that you specify, for the first inadr longword, any virtual address in the desired region.<br />
<br />
In general, the inadr argument should be specified; however, it can be omitted to request a special feature: for permanent global sections, you can omit the inadr argument, or specify it as 0, to request that the section be created but not mapped. Such a request will be granted regardless of the setting of the SEC$M_EXPREG flag; however, to ensure compatibility between VAX and Alpha or Integrity server systems, HP recommends that the SEC$M_EXPREG flag be clear when the inadr argument is omitted.<br />
<br />
==retadr==<br />
{{SyservArgument|address_range|longword (unsigned)|write only|by reference–array reference}}<br />
<br />
Starting and ending process virtual addresses into which the section was actually mapped by $CRMPSC. The retadr argument is the address of a 2-longword array containing, in order, the starting and ending process virtual addresses.<br />
<br />
On [[Alpha]] and [[Integrity]] server systems, the retadr argument returns starting and ending addresses of the usable range of addresses. This might differ from the total amount mapped. The retadr argument is required when the relpag argument is specified. If the section being mapped does not completely fill the last page used to map the section, the retadr argument indicates the highest address that actually maps the section. If the relpag argument is used to specify an offset into the section, the retadr argument reflects the offset.<br />
<br />
==acmode==<br />
{{SyservArgument|access_mode|longword (unsigned)|read only|by value}}<br />
<br />
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 defines the following symbols for the four access modes:<br />
<br />
{| class="wikitable"<br />
! colspan="col" | Symbol<br />
! colspan="col" | Access Mode<br />
|-<br />
| PSL$C_KERNEL<br />
| Kernel<br />
|-<br />
| PSL$C_EXEC<br />
| Executive<br />
|-<br />
| PSL$C_SUPER<br />
| Supervisor<br />
|-<br />
| PSL$C_USER<br />
| User<br />
|}<br />
<br />
The most privileged access mode used is the access mode of the caller.<br />
<br />
==flags==<br />
{{SyservArgument|mask_longword|longword (unsigned)|read only|by value}}<br />
<br />
Flag mask specifying the type of section to be created or mapped to, as well as its characteristics. The flags argument is a longword bit vector wherein each bit corresponds to a flag. The [[$SECDEF]] macro defines 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.<br />
<br />
The following table describes each flag and the default value that it supersedes:<br />
<br />
{| class="wikitable"<br />
! colspan="col" | Flag<br />
! colspan="col" | Description<br />
|-<br />
| SEC$M_CRF<br />
| Pages are copy-on-reference. By default, pages are shared.<br />
|-<br />
| SEC$M_DZRO<br />
| Pages are demand-zero pages. By default, they are not zeroed when copied.<br />
|-<br />
| SEC$M_EXECUTE<br />
| Pages are mapped if the caller has execute access. This flag takes effect only ( 1 ) when specified from executive or kernel mode, ( 2 ) when the SEC$M_GBL flag is also specified, and ( 3 ) when SEC$M_WRT is not specified. By default $CRMPSC performs a read access check against the section.<br />
|-<br />
| SEC$M_EXPREG<br />
| Pages are mapped into the first available space. By default, pages are mapped into the range specified by the inadr argument. See the [[#inadr|inadr]] argument description for a complete explanation of how to set the SEC$M_EXPREG flag.<br />
|-<br />
| SEC$M_GBL<br />
| Pages form a global section. The default is private section.<br />
|-<br />
| SEC$M_NO_OVERMAP<br />
| Pages cannot overmap existing address space. Note that, by default, pages can overmap existing address space.<br />
|-<br />
| SEC$M_PAGFIL<br />
| Pages form a global page file section. By default, pages form a disk file section. SEC$M_PAGFIL also implies SEC$M_WRT and SEC$M_DZRO.<br />
|-<br />
| SEC$M_PERM<br />
| Global section is permanent. By default, global sections are temporary.<br />
|-<br />
| SEC$M_PFNMAP<br />
| Pages form a page frame section. By default, pages form a disk file section. 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; this can result in a machine check if<br />
they are in I/O space.<br />
On [[Alpha]] and [[Integrity]] server systems, when the SEC$M_PFNMAP flag is set, the pagcnt and relpag arguments are interpreted in CPU-specific pages, not as pagelets.<br />
|-<br />
| SEC$M_SYSGBL<br />
| Pages form a system global section. By default, pages form a group global section.<br />
|-<br />
| SEC$M_UNCACHED<br />
| Flag that must be set when a PFN-mapped section is created if this section is to be treated as uncached memory. Flag is ignored on Alpha systems; it applies only to Integrity server systems.<br />
|-<br />
| SEC$M_WRT<br />
| Pages form a read/write section. By default, pages form a read-only section.<br />
|}<br />
<br />
==gsdnam==<br />
{{SyservArgument|section_name|character-coded text string|read only|by descriptor–fixed-length string descriptor}}<br />
<br />
Name of the global section. The gsdnam argument is the address of a character string descriptor pointing to this name string.<br />
<br />
For group global sections, the operating system interprets the UIC group as part of the global section name; thus, the names of global sections are unique to UIC groups.<br />
<br />
You can specify any name from 1 to 43 characters. All processes mapping to the same global section must specify the same name. Note that the name is case sensitive.<br />
<br />
Use of characters valid in logical names is strongly encouraged. Valid values include alphanumeric characters, the dollar sign ($), and the underscore (_). If the name string begins with an underscore (_), the underscore is stripped and the resultant string is considered to be the actual name. Use of the colon (:) is not permitted.<br />
<br />
Names are first subject to a logical name translation, after the application of the prefix GBL$ to the name. If the result translates, it is used as the name of the section. If the resulting name does not translate, the name specified by the caller is used as the name of the section.<br />
<br />
Additional information on logical name translations and on section name processing is available in the [https://support.hpe.com/hpsc/doc/public/display?docId=emr_na-c04621447 OpenVMS Programming Concepts Manual].<br />
<br />
==ident==<br />
{{SyservArgument|section_id|quadword (unsigned)|read only|by reference}}<br />
<br />
Identification value specifying the version number of a global section and, for processes mapping to an existing global section, the criteria for matching the identification. The ident argument is the address of a quadword structure containing three fields.<br />
<br />
The version number is in the second longword. The version number contains two fields: a minor identification in the low-order 24 bits and a major identification in the high-order 8 bits. You can assign values for these fields by installation convention to differentiate versions of global sections. If no version number is specified when a section is created, processes that specify a version number when mapping cannot access the global section.<br />
<br />
The first longword specifies, in its low-order two bits, the matching criteria. The valid values, symbolic names by which they can be specified, and their meanings are as follows:<br />
<br />
{| class="wikitable"<br />
! colspan="col" | Value/Name<br />
! colspan="col" | Match Criteria<br />
|-<br />
| 0 SEC$K_MATALL<br />
| Match all versions of the section.<br />
|-<br />
| 1 SEC$K_MATEQU<br />
| Match only if major and minor identifications match.<br />
|-<br />
| 2 SEC$K_MATLEQ<br />
| Match if the major identifications are equal and the minor identification of the mapper is less than or equal to the minor identification of the global section.<br />
|-<br />
|}<br />
<br />
When a section is mapped at creation time, the match control field is ignored.<br />
<br />
If you do not specify the ident argument or specify it as 0 (the default), the version number and match control fields default to 0.<br />
<br />
==relpag==<br />
{{SyservArgument|longword_unsigned|longword (unsigned)|read only|by value}}<br />
<br />
Relative page number within the global section of the first page in the section to be mapped. The relpag argument is a longword containing this page number.<br />
<br />
On [[Alpha]] and [[Integrity]] server systems, the relpag argument is interpreted as an index into the section file, measured in pagelets for a file-backed section or in CPU-specific pages for a PFN-mapped section.<br />
<br />
On [[Alpha]] or [[Integrity]] servers, you use this argument only for global sections. If you do not specify the relpag argument or specify it as 0 (the default), the global section is mapped beginning with the first virtual block in the file.<br />
<br />
==chan==<br />
{{SyservArgument|channel|word (unsigned)|read only|by value}}<br />
<br />
Number of the channel on which the file has been accessed. The chan argument is a word containing this number.<br />
<br />
The file must have been accessed with the OpenVMS RMS macro [[$OPEN]]; the file options parameter (FOP) in the FAB must indicate a user file open (UFO keyword). The access mode at which the channel was opened must be equal to or less privileged than the access mode of the caller.<br />
<br />
==pagcnt==<br />
{{SyservArgument|longword_unsigned|longword (unsigned)|read only|by value}}<br />
<br />
Number of pagelets in the section. The pagcnt argument is a longword containing this number.<br />
<br />
On Alpha and Integrity server systems, the smallest allocation is an Alpha or Integrity servers page, which is 8192 bytes. When requesting pagelets, the size requested is a multiple of 512 bytes, but the actual allocation is rounded to 8192.<br />
<br />
For example, when requesting 17 pagelets, the allocation is for two Alpha or Integrity servers pages, 16384 bytes.<br />
<br />
On Alpha and Integrity server systems, if the SEC$M_PFNMAP flag bit is set, the pagcnt argument is interpreted as CPU-specific pages, not as pagelets.<br />
<br />
On Alpha or Integrity server systems, the specified page count is compared with the number of blocks in the section file; if they are different, the lower value is used. If you do not specify the page count or specify it as 0 (the default), the size of the section file is used. However, for physical page frame sections, this argument must not be 0.<br />
<br />
==vbn==<br />
{{SyservArgument|longword_unsigned|longword (unsigned)|read only|by value}}<br />
<br />
Virtual block number in the file that marks the beginning of the section. The vbn argument is a longword containing this number. If you do not specify the vbn argument or specify it as 0 (the default), the section is created beginning with the first virtual block in the file.<br />
<br />
If you specified page frame number mapping (by setting the SEC$M_PFNMAP flag), the vbn argument specifies the CPU-specific page frame number where the section begins in memory.<br />
<br />
The following table shows which arguments are required and which are optional for three different uses of the $CRMPSC service:<br />
<br />
{| class="wikitable"<br />
! colspan="col" | Argument<br />
! colspan="col" | Create/Map Global Section<br />
! colspan="col" | Map Global Section (maps an existing global section)<br />
! colspan="col" | Create/Map Private Section<br />
|-<br />
| '''inadr'''<br />
| Optional (see the description of [[#inadr|inadr]] for the rules governing the omission of the argument)<br />
| Required<br />
| Required<br />
|-<br />
| '''retadr'''<br />
| Optional<br />
| Optional<br />
| Optional<br />
|-<br />
| '''acmode'''<br />
| Optional<br />
| Optional<br />
| Optional<br />
|-<br />
| '''flags'''<br />
| colspan="3" |<br />
|-<br />
| SEC$M_GBL<br />
| Required<br />
| Ignored<br />
| Not used<br />
|-<br />
| SEC$M_CRF (For physical page frame sections: vbn specifies the starting page frame number; chan must be 0; pfc is not used; and the SEC$M_CRF and SEC$M_DZRO flag bit settings are invalid. For page file sections, chan must be 0 and pfc not used)<br />
| Optional <br />
| Not used <br />
| Optional<br />
|-<br />
| SEC$M_DZRO (For physical page frame sections: vbn specifies the starting page frame number; chan must be 0; pfc is not used; and the SEC$M_CRF and SEC$M_DZRO flag bit settings are invalid. For page file sections, chan must be 0 and pfc not used)<br />
| Optional <br />
| Not used <br />
| Optional<br />
|-<br />
| SEC$M_EXPREG <br />
| Optional <br />
| Optional <br />
| Optional<br />
|-<br />
| SEC$M_PERM <br />
| Optional (see the description of [[#inadr|inadr]] for the rules governing the omission of the argument)<br />
| Not used <br />
| Not used<br />
|-<br />
| SEC$M_PFNMAP <br />
| Optional <br />
| Not used <br />
| Optional<br />
|-<br />
| SEC$M_SYSGBL <br />
| Optional <br />
| Optional <br />
| Not used<br />
|-<br />
| SEC$M_WRT <br />
| Optional <br />
| Optional <br />
| Optional<br />
|-<br />
| SEC$M_PAGFIL <br />
| Optional <br />
| Not used <br />
| Not used<br />
|-<br />
| '''gdsnam'''<br />
| Required<br />
| Required<br />
| Not used<br />
|-<br />
| '''ident'''<br />
| Optional<br />
| Optional<br />
| Not used<br />
|-<br />
| '''relpag''' (For physical page frame sections: vbn specifies the starting page frame number; chan must be 0; pfc is not used; and the SEC$M_CRF and SEC$M_DZRO flag bit settings are invalid. For page file sections, chan must be 0 and pfc not used)<br />
| Optional<br />
| Optional<br />
| Not used<br />
|-<br />
| '''chan''' (For physical page frame sections: vbn specifies the starting page frame number; chan must be 0; pfc is not used; and the SEC$M_CRF and SEC$M_DZRO flag bit settings are invalid. For page file sections, chan must be 0 and pfc not used)<br />
| Required<br />
|<br />
| Required<br />
|-<br />
| '''pagcnt'''<br />
| Required<br />
| <br />
| Required<br />
|-<br />
| '''vbn''' (For physical page frame sections: vbn specifies the starting page frame number; chan must be 0; pfc is not used; and the SEC$M_CRF and SEC$M_DZRO flag bit settings are invalid. For page file sections, chan must be 0 and pfc not used)<br />
| Optional<br />
| <br />
| Optional<br />
|-<br />
| '''prot'''<br />
| Optional<br />
| <br />
| Not used<br />
|-<br />
| '''pfc''' (For physical page frame sections: vbn specifies the starting page frame number; chan must be 0; pfc is not used; and the SEC$M_CRF and SEC$M_DZRO flag bit settings are invalid. For page file sections, chan must be 0 and pfc not used)<br />
| Optional<br />
|<br />
| Optional<br />
|}<br />
<br />
<br />
==prot==<br />
{{SyservArgument|file_protection|longword (unsigned)|read only|by value}}<br />
<br />
Protection to be applied to the global page file and PFN sections. For file-backed sections, the protection is taken from the backing file and the prot argument is ignored.<br />
<br />
The mask contains four 4-bit fields. Bits are read from right to left in each field.<br />
<br />
The following diagram from {{Template:SyservII}} depicts the mask:<br />
[[File:ZK-1706-GE.png|thumb]]<br />
<br />
Cleared bits indicate that read, write, execute, and delete access, in that order, are granted to the particular category of user.<br />
<br />
Only read, write, and execute access are meaningful for section protection. Delete access bits are ignored. Read access also grants execute access for those situations where execute access applies.<br />
<br />
Protection is taken from the system or group global section template for page file or PFN global sections if the prot argument is not specified.<br />
<br />
==pfc==<br />
{{SyservArgument|longword_unsigned|longword (unsigned)|read only|by value}}<br />
<br />
Page fault cluster size indicating how many pagelets are to be brought into memory when a page fault occurs for a single page.<br />
<br />
On Alpha and Integrity server systems, this argument is not used for page file sections or physical page frame sections. The pfc argument is rounded up to CPU-specific pages. That is, at least 16 pagelets (on an Alpha or Integrity servers system with an 8KB page size) will be mapped for each physical page. The system cannot map less than one physical page.<br />
<br />
=Required Access or Privileges=<br />
<br />
If $CRMPSC specifies a global section and the SS$_NOPRIV condition value is returned, the process does not have the required privilege to create that section. <br />
<br />
To create global sections, the process must have the following privileges:<br />
* [[SYSGBL]] privilege to create a system global section<br />
* [[PRMGBL]] privilege to create a permanent global section<br />
* [[PFNMAP]] privilege to create a page frame section<br />
<br />
Note that you do not need PFNMAP privilege to map an existing page frame section.<br />
<br />
=Required Quota=<br />
<br />
If the section pages are copy-on-reference, the process must have sufficient paging file quota ([[PGFLQUOTA]]). The systemwide number of global page file pages is limited by the system parameter [[GBLPAGFIL]].<br />
<br />
=Condition Values Returned=<br />
<br />
{| class="wikitable"<br />
! colspan="col" | Value<br />
! colspan="col" | Description<br />
|-<br />
| SS$_NORMAL <br />
| The service completed successfully. The specified global section already exists and has been<br />
mapped.<br />
|-<br />
| SS$_CREATED <br />
| The service completed successfully. The specified global section did not previously exist and has<br />
been created.<br />
|-<br />
| SS$_ACCVIO <br />
| The inadr argument, gsdnam argument, or name descriptor cannot be read by the caller; the inadr argument was omitted; or the retadr argument cannot be written by the caller.<br />
|-<br />
| SS$_ENDOFFILE <br />
| The starting virtual block number specified is beyond the logical end-of-file, or the value in the relpag argument is greater than or equal to the actual size of the global section.<br />
|-<br />
| SS$_EXBYTLM <br />
| The process has exceeded the byte count quota; the system was unable to map the requested file.<br />
|-<br />
| SS$_EXGBLPAGFIL <br />
| The process has exceeded the systemwide limit on global page file pages; no part of the section<br />
was mapped.<br />
|-<br />
| SS$_EXQUOTA <br />
| The process exceeded its paging file quota while creating copy-on-reference or page file backing<br />
store pages.<br />
|-<br />
| SS$_GPTFULL <br />
| There is no more room in the system global page table to set up page table entries for the section.<br />
|-<br />
| SS$_GSDFULL <br />
| There is no more room in the system space allocated to maintain control information for global sections.<br />
|-<br />
| SS$_ILLPAGCNT <br />
| The page count value is negative or is 0 for a physical page frame section.<br />
|-<br />
| SS$_INSFMEM <br />
| Not enough pages are available in the specified shared memory to create the section.<br />
|-<br />
| SS$_INSFWSL <br />
| The process’s working set limit is not large enough to accommodate the increased size of the address space.<br />
|-<br />
| SS$_IVCHAN <br />
| An invalid channel number was specified, that is, a channel number of 0 or a number larger than<br />
the number of channels available.<br />
|-<br />
| SS$_IVCHNLSEC <br />
| The channel number specified is currently active.<br />
|-<br />
| SS$_IVLOGNAM <br />
| The specified global section name has a length of 0 or has more than 43 characters.<br />
|-<br />
| SS$_IVLVEC <br />
| The specified section was not installed using the /PROTECT qualifier.<br />
|-<br />
| SS$_IVSECFLG <br />
| An invalid flag, a reserved flag, a flag requiring a privilege you lack, or an invalid combination of flags was specified.<br />
|-<br />
| SS$_IVSECIDCTL <br />
| The match control field of the global section identification is invalid.<br />
|-<br />
| SS$_NOPRIV <br />
| The process does not have the privileges to create a system global section (SYSGBL) or a permanent group global section (PRMGBL). <br />
The process does not have the privilege to create a section starting at a specific physical page frame number (PFNMAP). <br />
The process does not have the privilege to create<br />
a global section in memory shared by multiple processors (SHMEM).<br />
A page in the input address range is in the system address space.<br />
The specified channel is not assigned or was assigned from a more privileged access mode.<br />
|-<br />
| SS$_NOSHPTS <br />
| A virtual address within a shared page table region was specified.<br />
|-<br />
| SS$_NOTFILEDEV <br />
| The device is not a file-oriented, random-access, or directory device.<br />
|-<br />
| SS$_NOWRT <br />
| The section cannot be written to because the flag bit SEC$M_WRT is set, the file is read only, and the flag bit SEC$M_CRF is not set.<br />
|-<br />
| SS$_PAGOWNVIO <br />
| A page in the specified input address range is owned by a more privileged access mode.<br />
|-<br />
| SS$_SECREFOVF <br />
| The maximum number of references for a global section has been reached (2,147,483,647).<br />
|-<br />
| SS$_SECTBLFUL <br />
| There are no entries available in the system global section table or in the process section<br />
table.<br />
|-<br />
| SS$_TOOMANYLNAM <br />
| The logical name translation of the gsdnam argument exceeded the allowed depth.<br />
|-<br />
| SS$_VA_IN_USE <br />
| A page in the specified input address range is already mapped, and the flag SEC$M_NO_OVERMAP is set, or the existing underlying page cannot be deleted because it is associated with a buffer object.<br />
|-<br />
| SS$_VASFULL <br />
| The process’s virtual address space is full; no space is available in the page tables for the pages<br />
created to contain the mapped global section.<br />
|}<br />
<br />
=See also=<br />
* [[$ADJSTK]]<br />
* [[$ADJWSL]]<br />
* [[$CRETVA]]<br />
* [[$DELTVA]]<br />
* [[$DGBLSC]]<br />
* [[$EXPREG]]<br />
* [[$LCKPAG]]<br />
* [[$LKWSET]]<br />
* [[$MGBLSC]]<br />
* [[$PURGWS]]<br />
* [[$SETPRT]]<br />
* [[$SETSTK]]<br />
* [[$SETSWM]]<br />
* [[$ULKPAG]]<br />
* [[$ULWSET]]<br />
* [[$UPDSEC]]<br />
* [[$UPDSECW]]</div>Darya.zelenina