[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: alarm_signal_handler is called too frequently
From: |
YAMAMOTO Mitsuharu |
Subject: |
Re: alarm_signal_handler is called too frequently |
Date: |
Fri, 29 Oct 2004 17:24:02 +0900 |
User-agent: |
Wanderlust/2.10.1 (Watching The Wheels) SEMI/1.14.5 (Awara-Onsen) FLIM/1.14.5 (Demachiyanagi) APEL/10.6 Emacs/21.3.50 (sparc-sun-solaris2.8) MULE/5.0 (SAKAKI) |
>>>>> On Fri, 29 Oct 2004 09:00:14 +0200, "Jan D." <address@hidden> said:
>> That's the reason why I did the following question:
>>
>> I think we don't have to call set_alarm when pending_atimers is
>> non-zero because do_pending_atimers is supposed to be called
>> eventually in such a case. Is that correct?
> You mean like this?
> + if (! (pending_atimers && interrupt_input_blocked))
> set_alarm ();
> That works and should save a couple of CPU cycles.
I've been using the similar patch in
http://lists.gnu.org/archive/html/emacs-devel/2004-10/msg00553.html
for two weeks on Solaris/X11 and Mac OS X/Carbon, and it seems to work
fine for me.
Reduction of CPU cycles is prominent in Mac OS X/Carbon where
BLOCK_INPUT is enabled for a long time while waiting for some user
input in sys_select (mac.c). We need BLOCK_INPUT (or something like
this) here because the only way to know whether input is available or
not is to call ReceiveNextEvent, and this function is not reentrant.
I think we don't have to poll input with signal while waiting for
input.
YAMAMOTO Mitsuharu
address@hidden
- alarm_signal_handler is called too frequently, YAMAMOTO Mitsuharu, 2004/10/12
- Re: alarm_signal_handler is called too frequently, Richard Stallman, 2004/10/13
- Re: alarm_signal_handler is called too frequently, YAMAMOTO Mitsuharu, 2004/10/14
- Re: alarm_signal_handler is called too frequently, YAMAMOTO Mitsuharu, 2004/10/17
- Re: alarm_signal_handler is called too frequently, Richard Stallman, 2004/10/25
- Re: alarm_signal_handler is called too frequently, Jan D., 2004/10/25
- Re: alarm_signal_handler is called too frequently, Richard Stallman, 2004/10/27
- Re: alarm_signal_handler is called too frequently, Jan D., 2004/10/28
- Re: alarm_signal_handler is called too frequently, YAMAMOTO Mitsuharu, 2004/10/28
- Re: alarm_signal_handler is called too frequently, Jan D., 2004/10/29
- Re: alarm_signal_handler is called too frequently,
YAMAMOTO Mitsuharu <=
- Re: alarm_signal_handler is called too frequently, Richard Stallman, 2004/10/31
- Re: alarm_signal_handler is called too frequently, Jan D., 2004/10/31