From mboxrd@z Thu Jan 1 00:00:00 1970 From: Stas Sergeev Subject: Re: Introducing my own interrupt in dosemu. Date: Wed, 21 Jul 2004 20:26:24 +0400 Sender: linux-msdos-owner@vger.kernel.org Message-ID: <40FE9930.4070607@aknet.ru> Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Return-path: List-Id: Content-Type: text/plain; charset="us-ascii"; format="flowed" To: linux-msdos@vger.kernel.org Hello. Wartan Hachaturow wrote: > At irq frequencies of, say, 128 HZ, I've faced a "lost interrupts" > Are there any common ways to deal with serialization of interrupts Yes, see the timer code (as you already did, pic_sched() is from there). Doing pic_sched() before do_irq() should do the trick for the periodic interrupts. However, as your interrupt is not periodic but rather a signal-driven, this may not be what you want. The easiest way around may be this: in your signal handler you increment the counter and call pic_request(). In the IRQ handler function you decrement the counter, and if it is >0, you do pic_request() right there, before do_irq(). This will compensate the lost irqs. Something like that is done in raw_mouse_getevents(). Maybe we need a better queueing mechanism, but so far noone needed it and I think one was removed 5 years ago.