From mboxrd@z Thu Jan 1 00:00:00 1970 Subject: Re: [Xenomai-core] [patch, minor] xnpipe_recv and xntimer_get_timeout_periodic() From: Philippe Gerum In-Reply-To: References: <1156153751.4402.28.camel@domain.hid> Content-Type: text/plain Date: Mon, 21 Aug 2006 20:02:02 +0200 Message-Id: <1156183323.4321.14.camel@domain.hid> Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Reply-To: rpm@xenomai.org List-Id: "Xenomai life and development \(bug reports, patches, discussions\)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Dmitry Adamushko Cc: xenomai@xenomai.org On Mon, 2006-08-21 at 19:45 +0200, Dmitry Adamushko wrote: > > > On 21/08/06, Philippe Gerum wrote: > On Mon, 2006-08-21 at 10:36 +0200, Dmitry Adamushko wrote: > > > [ timer.c.patch] xnticks_t is unsigned while (as I > understand) > > "xntlholder_date(&timer->plink) - nkpod->jiffies" can be > negative. > > ok, I somehow missed a check for xntimer_running_p() in > xntimer_get_timeout(). I bet it was not there when I was looking at > this part of code yesterday or maybe I just had too much ummmm > wonderful belgium beer :o) It's been there since the fusion times! Ok, it must be the beer... :o> > > Actually xntimer_get_timeout() should be called with nklock held + irq > off as it must be atomic. But anyway, this is how it's used in all > places and it's probably not supposed to be used "as is" from any > upper layer. So it's ok. > Indeed. > > > -- > Best regards, > Dmitry Adamushko -- Philippe.