From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: f678f,50e6ef61e2fda788 X-Google-Attributes: gidf678f,public X-Google-ArrivalTime: 1994-10-21 19:52:48 PST Newsgroups: comp.unix.osf.misc Path: bga.com!news.sprintlink.net!howland.reston.ans.net!gatech!newsxfer.itd.umich.edu!gumby!yale!yale!yale.edu!noc.near.net!atria.com!pluto!mishkin From: mishkin@atria.com (Nathaniel Mishkin) Subject: Re: What is volatile data type in DCE? Message-ID: Sender: news@atria.com Nntp-Posting-Host: pluto.atria.com Organization: Atria Software, Inc. X-Newsreader: TIN [version 1.2 PL0] References: Date: Sat, 22 Oct 1994 02:52:48 GMT Yuh Ming YONG (ymyong@neumann.uwaterloo.ca) wrote: : I notice that in DCE client's stub code the call handle is : declared as having a volatile data type as follows: : volatile rpc_call_handle_t call_h = NULL; : Could anyone tell me the significant or meaning of volatile : data type? Thank you very much. "volatile" is an ANSI C keyword that the RPC code uses in an attempt to keep the C compiler from homing the variable in a register. It wants it not in a register since the variable is used along an exception path--i.e., it may be reached by a call to longjmp() having been made--and it doesn't trust the compiler (which is often not aware of what longjmp() does to registers) to not mess things up. -- -- Nat Mishkin Atria Software, Inc. mishkin@atria.com