From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: <546323F9.9040608@xenomai.org> Date: Wed, 12 Nov 2014 10:10:17 +0100 From: Philippe Gerum MIME-Version: 1.0 References: <54631EB1.1050900@sigmatek.at> In-Reply-To: <54631EB1.1050900@sigmatek.at> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Subject: Re: [Xenomai] rtdm_nrtsig_pend FAQ List-Id: Discussions about the Xenomai project List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: johann.obermayr@sigmatek.at, "Xenomai@xenomai.org" On 11/12/2014 09:47 AM, Johann Obermayr wrote: > Hello, > > we use rtdm_nrtsig_pend follow. > > static rtdm_nrtsig_t wait_domain_nrt; > static DECLARE_WAIT_QUEUE_HEAD(wait_domain_wq); > > void period_update() > { > wait_domain_pend_count++; > rtdm_nrtsig_pend(&wait_domain_nrt); > } > > static void wait_domain_nrt_handler(rtdm_nrtsig_t nrt_sig, void *arg) > { > wait_domain_call_count++; > //wakeup wait_domain > wait_domain_wakeup = 1; > wake_up_interruptible(&wait_domain_wq); > } > > > period_update is called every millisecond. > this is on imx6 hardware with kernel 3.0.x and xenomai 2.6.2.1. > > Why wait_domain_call_count can be smaller that wait_domain_pend_count. > The difference between the counters is growing. > > Why ? > nrt signals are based on I-pipe virtual irqs, which do not pile up: there is a single signal pending until the irq can be delivered to the handler, regardless of how many times it has been triggered. -- Philippe.