/********************************************************************************************************************************/ /* Created: 15-MAR-2001 23:38:13 by OpenVMS SDL EV1-33 */ /* Source: 15-MAR-2001 23:34:21 _$11$DUA933:[BUILD.SDL]STARDEFQZ.SDI;1 */ /********************************************************************************************************************************/ /*** MODULE $SECDEF ***/ #ifndef __SECDEF_LOADED #define __SECDEF_LOADED 1 #pragma nostandard #ifdef __cplusplus extern "C" { #define __unknown_params ... #else #define __unknown_params #endif #if !defined(__VAXC) && !defined(VAXC) #define __struct struct #define __union union #else #define __struct variant_struct #define __union variant_union #endif /*+ */ /* PROCESS OR GLOBAL SECTION DEFINITIONS */ /*- */ /* */ /* ***** L_VBN, L_WINDOW, AND B_PFC MUST BE THE SAME OFFSET VALUES AS THE */ /* ***** EQUIVALENTLY NAMED OFFSETS IN $PFLDEF */ /* */ #define SEC$M_VPX 0x3FFFFF #define SEC$M_PFC 0xFF000000 #define SEC$M_GBL 0x1 #define SEC$M_CRF 0x2 #define SEC$M_DZRO 0x4 #define SEC$M_WRT 0x8 #define SEC$M_SHMGS 0x10 #define SEC$M_WRTMOD 0xC0 #define SEC$M_AMOD 0x300 #define SEC$M_RESIDENT 0x2000 #define SEC$M_PERM 0x4000 #define SEC$M_SYSGBL 0x8000 #define SEC$M_PFNMAP 0x10000 #define SEC$M_EXPREG 0x20000 #define SEC$M_PROTECT 0x40000 #define SEC$M_PAGFIL 0x80000 #define SEC$M_EXECUTE 0x100000 #define SEC$M_NOPROTCHK 0x200000 #define SEC$M_NO_OVERMAP 0x400000 #define SEC$M_INPROG 0x800000 #define SEC$M_PARANOID 0x1000000 #define SEC$M_GRANHINT 0x2000000 struct secdef { __union { unsigned int sec$l_gsd; /*GLOBAL SECTION DESCRIPTOR ADDRESS */ unsigned int sec$l_ccb; /*CHANNEL CONTROL BLOCK ADDRESS IF PROCESS SECTION */ } sec$r_gsd_overlay; unsigned short int sec$w_secxfl; /*SECTION INDEX FORWARD LINK */ unsigned short int sec$w_secxbl; /*SECTION INDEX BACKWARD LINK */ __union { unsigned int sec$l_vpxpfc; /*START VIRT PAGE INDEX & PFC */ __struct { unsigned sec$v_vpx : 22; /* STARTING VIRTUAL PAGE INDEX */ unsigned secdef$$_fill_1 : 2; /* UNUSED */ unsigned sec$v_pfc : 8; /* PAGE FAULT CLUSTER */ } sec$r_vpxpfc_bits; __struct { char secdef$$_fill_5 [3]; unsigned char sec$b_pfc; /*PAGE FAULT CLUSTER */ } sec$r_vpxpfc_fields; } sec$r_vpxpfc_overlay; unsigned int sec$l_window; /*WINDOW CONTROL BLOCK */ unsigned int sec$l_vbn; /*BASE VIRTUAL BLOCK NUMBER */ __union { unsigned short int sec$w_flags; /*VARIOUS CONTROL FLAGS */ __struct { unsigned sec$v_gbl : 1; /* GLOBAL SECTION */ unsigned sec$v_crf : 1; /* COPY ON REFERENCE */ unsigned sec$v_dzro : 1; /* DEMAND ZERO */ unsigned sec$v_wrt : 1; /* WRITABLE */ unsigned sec$v_shmgs : 1; /* SHARED MEMORY GLOBAL SECTION */ unsigned secdef$$_fill_2 : 1; /* SPARE */ unsigned sec$v_wrtmod : 2; /* WRITE ACCESS MODE FOR SECTION */ unsigned sec$v_amod : 2; /* ACCESS MODE OF SECTION */ unsigned secdef$$_fill_3 : 3; /* SPARE */ unsigned sec$v_resident : 1; /* RESIDENT GLOBAL */ unsigned sec$v_perm : 1; /* PERMANENT SECTION */ unsigned sec$v_sysgbl : 1; /* 1 = SYSTEM GLOBAL, 0 = GROUP GLOBAL */ /* */ /* ***** THE FOLLOWING FLAGS ARE INDICATORS FOR $MGBLSC AND $CRMPSC SYSTEM */ /* ***** SERVICE REQUESTS AND ARE NOT STORED IN THE FLAGS WORD FIELD. */ /* */ unsigned sec$v_pfnmap : 1; /* MAP TO SPECIFIC PFN'S */ unsigned sec$v_expreg : 1; /* MAP INTO FIRST FREE ADDRESS SPACE */ unsigned sec$v_protect : 1; /* CHECK WRITE ACCESS MODE (WRTMOD) */ unsigned sec$v_pagfil : 1; /* GLOBAL SECTION HAS PAGE FILE BACKING STORE */ unsigned sec$v_execute : 1; /* CHECK FOR EXECUTE ACCESS */ unsigned sec$v_noprotchk : 1; /* INHIBIT PROTECTION CHECK */ unsigned sec$v_no_overmap : 1; /* DON'T OVERMAP ADDRESS SPACE */ unsigned sec$v_inprog : 1; /* Section creation in progress */ unsigned sec$v_paranoid : 1; /* Go into paranoia mode */ unsigned sec$v_granhint : 1; /* AXP granularity hint support */ unsigned sec$v_fill_4 : 6; } sec$r_flags_bits; } sec$r_flags_overlay; } ; #if !defined(__VAXC) && !defined(VAXC) #define sec$l_gsd sec$r_gsd_overlay.sec$l_gsd #define sec$l_ccb sec$r_gsd_overlay.sec$l_ccb #define sec$l_vpxpfc sec$r_vpxpfc_overlay.sec$l_vpxpfc #define sec$v_vpx sec$r_vpxpfc_overlay.sec$r_vpxpfc_bits.sec$v_vpx #define sec$v_pfc sec$r_vpxpfc_overlay.sec$r_vpxpfc_bits.sec$v_pfc #define sec$b_pfc sec$r_vpxpfc_overlay.sec$r_vpxpfc_fields.sec$b_pfc #define sec$w_flags sec$r_flags_overlay.sec$w_flags #define sec$v_gbl sec$r_flags_overlay.sec$r_flags_bits.sec$v_gbl #define sec$v_crf sec$r_flags_overlay.sec$r_flags_bits.sec$v_crf #define sec$v_dzro sec$r_flags_overlay.sec$r_flags_bits.sec$v_dzro #define sec$v_wrt sec$r_flags_overlay.sec$r_flags_bits.sec$v_wrt #define sec$v_shmgs sec$r_flags_overlay.sec$r_flags_bits.sec$v_shmgs #define sec$v_wrtmod sec$r_flags_overlay.sec$r_flags_bits.sec$v_wrtmod #define sec$v_amod sec$r_flags_overlay.sec$r_flags_bits.sec$v_amod #define sec$v_resident sec$r_flags_overlay.sec$r_flags_bits.sec$v_resident #define sec$v_perm sec$r_flags_overlay.sec$r_flags_bits.sec$v_perm #define sec$v_sysgbl sec$r_flags_overlay.sec$r_flags_bits.sec$v_sysgbl #define sec$v_pfnmap sec$r_flags_overlay.sec$r_flags_bits.sec$v_pfnmap #define sec$v_expreg sec$r_flags_overlay.sec$r_flags_bits.sec$v_expreg #define sec$v_protect sec$r_flags_overlay.sec$r_flags_bits.sec$v_protect #define sec$v_pagfil sec$r_flags_overlay.sec$r_flags_bits.sec$v_pagfil #define sec$v_execute sec$r_flags_overlay.sec$r_flags_bits.sec$v_execute #define sec$v_noprotchk sec$r_flags_overlay.sec$r_flags_bits.sec$v_noprotchk #define sec$v_no_overmap sec$r_flags_overlay.sec$r_flags_bits.sec$v_no_overmap #define sec$v_inprog sec$r_flags_overlay.sec$r_flags_bits.sec$v_inprog #define sec$v_paranoid sec$r_flags_overlay.sec$r_flags_bits.sec$v_paranoid #define sec$v_granhint sec$r_flags_overlay.sec$r_flags_bits.sec$v_granhint #endif /* #if !defined(__VAXC) && !defined(VAXC) */ #define SEC$K_LENGTH 32 /*SIZE OF PSTE/GSTE */ #define SEC$C_LENGTH 32 /*SIZE OF PSTE/GSTE */ /*+ */ #define SEC$K_MATALL 0 /* MATCH ALWAYS, USE GLOBAL SECTION */ #define SEC$K_MATEQU 1 /* MATCH IF ISD$L_IDENT EQU GBL ID */ #define SEC$K_MATLEQ 2 /* MATCH IF ISD$L_IDENT LEQ GBL ID */ struct secdef1 { char secdef$$_fill_6 [21]; unsigned char sec$b_amod; /*ACCESS MODE OF SECTION */ short int secdef$$_fill_4; /*SPARE */ unsigned int sec$l_refcnt; /*COUNT OF PTE'S REFERENCING THIS SECTION */ unsigned int sec$l_pagcnt; /*NO. OF PAGES IN THE SECTION */ /* */ /* ***** NOTE THAT NUMBER OF LONG WORDS MUST BE EVEN */ /* */ /* MATCH CONTROL VIELD VALUES */ /*- */ /* BASE OF ZERO , INCR 1 */ } ; /* */ /* Definitions for $GETSECI service */ /* */ #define SECI$_CHAIN 1 /* Chained item block */ #define SECI$_GSMODE 2 /* Access mode of section */ #define SECI$_GSFLAGS 3 /* Flags */ #define SECI$_GSNAME 4 /* Global section name */ #define SECI$_GSIDENT 5 /* Global section ident */ #define SECI$_GSRELPAG 6 /* Relative page number */ #ifdef __cplusplus } #endif #pragma standard #endif /* __SECDEF_LOADED */