From: MERC::"uunet!WKUVX1.BITNET!MacroMan" 17-NOV-1992 01:45:28.85 To: MACRO32@WKUVX1.BITNET CC: mwk.uucp@uunet.uu.net!gleason, GAVRON@IT.SUNQUEST.COM Subj: RE: Locking down a structure in C Date sent: 16-NOV-1992 23:36:41 > Here's another Open VMS Alpha AXP internals C question... ... > Now, I'm trying to use a structure... > > static struct > { > int l_zeep > int l_zap > int l_zip > } zzz ; > > What would be the "best" way to "calculate" the address of the ends of > structures to place in a range array for calling sys$lkwset? Since C structures by definition are contiguous (thanks for the proof, Bruce!) you know that it is of sizeof(zzz) and at address zzz. Therefore given a lock function that locks pages between addresses 1 and 2, lock(&zzz,(char *)(&zzz+(char *)sizeof(zzz))); should work... > >Lee K. Gleason N5ZMR >Control-G Consultants >gleason@mwk.uucp Ehud -- Ehud Gavron (EG76) gavron@vesta.sunquest.com This was sent "The world bores you when you're cool." from an Alpha