From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: <445E6267.6020407@domain.hid> Date: Sun, 07 May 2006 17:11:03 -0400 From: Jim Cromie MIME-Version: 1.0 Subject: Re: [Xenomai-help] help on alarms.. References: <445C2D1700022E97@domain.hid> (added by postmaster@domain.hid) In-Reply-To: <445C2D1700022E97@domain.hid> (added by postmaster@domain.hid) Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit List-Id: Help regarding installation and common use of Xenomai List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Prashanti Bedapudi Cc: xenomai@xenomai.org Prashanti Bedapudi wrote: > Attached is a piece of code using alarms, but I am seeing some unexpected > behavior. Any help will be appreciated. > > have a look at src/testsuite/latency it does what I believe youre seeking to do (tho I havent read your code) > in function main() the program behaves two different ways depending on where > I have the last printf() > > 1. It works fine and terminates as expected if I have it like this > while(!quit_now) > printf("quit_now = %d\n", quit_now); > > 2. It does not terminate if I have it this way. I know quit_now is set to 1, > since the last statement printed is 'quit_now is set to 1'. > > while(!quit_now); > printf("quit_now = %d\n", quit_now); > > thanks, > Shanti > >