From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 1164f8,4fddbfbbdbc53c4f X-Google-Attributes: gid1164f8,public From: bhcst4@vms.cis.pitt.edu Subject: Re: shared memory under OpenVMS Date: 1996/10/11 Message-ID: <53lsvs$ltf@usenet.srv.cis.pitt.edu>#1/1 X-Deja-AN: 188761697 references: <53l8fq$58d@drain.datlog.co.uk> organization: University of Pittsburgh newsgroups: comp.sys.dec :In article <53l8fq$58d@drain.datlog.co.uk:, rwoodwar@datlog.co.uk (Roger Woodward) writes: : Hi there, : : Can anyone point me to a helpful resource that details how to set up : and hook into shared memory under OpenVMS (via a C interface). : : thanks in advance for any help you can give me : : roger : : -- If by 'shared memory' you mean a global section, here's a little fragment, but you'll really have to read the System Services reference guide to understand how to get exactly what you want in terms of a global section. Look at sys$mgblsc() in addition to sys$crmpsc(). Ben Carter Systems & Networks University of Pittsburgh bhc+@pitt.edu (412)624-6470 ------------- #include secdef . . . Page_Count = ( sizeof( struct Monitor_Struct ) + 511 ) / 512; Status = sys$crmpsc( P0space, Mapadr, PSL$C_USER, SEC$M_GBL|SEC$M_DZRO|SEC$M_EXPREG|SEC$M_WRT|SEC$M_SYSGBL|SEC$M_PAGFIL|SEC$M_PERM, &LPD_MONITOR_Descr, 0, 0, 0, Page_Count, 0, 0xFF00, 0 ); if ( !( Status & 1 ) ) { printf( "\n\n%s Unable to create/map LPD_MONITOR section (%08X)", Prn_Time(), Status ); exit(0); } LPD_Monitor = ( struct Monitor_Struct * ) Mapadr[0]; . . .