Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com To: cygwin AT cygwin DOT com X-Injected-Via-Gmane: http://gmane.org/ Path: not-for-mail From: Joe Buehler Subject: [possible solution] Re: Cygwin Emacs-X uses 99% of cpu Date: Wed, 13 Nov 2002 15:11:09 -0500 Lines: 71 Message-ID: References: <3DD1E9AD DOT 7030504 AT 21cn DOT com> NNTP-Posting-Host: 64.47.34.2 Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Trace: main.gmane.org 1037218167 11786 64.47.34.2 (13 Nov 2002 20:09:27 GMT) X-Complaints-To: usenet AT main DOT gmane DOT org NNTP-Posting-Date: Wed, 13 Nov 2002 20:09:27 +0000 (UTC) User-Agent: Mozilla/5.0 (Windows; U; WinNT4.0; en-US; rv:1.1) Gecko/20020826 X-Accept-Language: en-us, en Huang. wrote: > run emacs under strace, when in 100% cpu, just repeats the following : > (repeat) > 106 202207420 [sig] emacs 1692 wait_sig: looping > 128 202207548 [sig] emacs 1692 wait_sig: awake > 108 202207656 [sig] emacs 1692 wait_sig: processing signal 14 > 129 202207785 [sig] emacs 1692 wait_sig: Got signal 14 > 105 202207890 [sig] emacs 1692 sig_handle: signal 14 > 123 202208013 [sig] emacs 1692 sig_handle: signal 14, about to call > 0x201240A4 > 108 202208121 [sig] emacs 1692 setup_handler: suspending mainthread > 193 202208314 [sig] emacs 1692 interruptible: pc 0x77E7E8BB, h > 0x77E60000, interruptible 1, testvalid 1 > 149 202208463 [sig] emacs 1692 interruptible: pc 0x77E7E8BB, h > 0x77E60000, interruptible 0, testvalid 0 > 131 202208594 [sig] emacs 1692 setup_handler: couldn't send signal 14 > 117 202208711 [sig] emacs 1692 setup_handler: ResumeThread returned 1 > 125 202208836 [sig] emacs 1692 setup_handler: returning 0 > 106 202208942 [sig] emacs 1692 sig_handle: returning 0 > (repeat) This may be something I ran into on a UNIX machine. If someone wants to rebuild emacs with the following patch, it might fix the problem. My recollection regarding this patch is that a periodic timer is being set up in emacs but there is a timing problem with how it is initialized. I will try and rebuild the Cygwin emacs package with this patch sometime tonight. Joe Buehler --- src/xterm.c Sat Mar 16 05:34:56 2002 +++ src/xterm.c Mon Oct 14 08:36:55 2002 @@ -14228,6 +14228,17 @@ #endif } + /* Install an asynchronous timer that processes Xt timeout events + every 0.1s. This is necessary because some widget sets use + timeouts internally, for example the LessTif menu bar, or the + Xaw3d scroll bar. When Xt timouts aren't processed, these + widgets don't behave normally. */ + { + EMACS_TIME interval; + EMACS_SET_SECS_USECS (interval, 0, 100000); + start_atimer (ATIMER_CONTINUOUS, interval, x_process_timeouts, 0); + } + #else /* not USE_X_TOOLKIT */ #ifdef HAVE_X11R5 XSetLocaleModifiers (""); @@ -14678,17 +14689,6 @@ XtCacheByDisplay, cvt_pixel_dtor); XtAppSetFallbackResources (Xt_app_con, Xt_default_resources); - - /* Install an asynchronous timer that processes Xt timeout events - every 0.1s. This is necessary because some widget sets use - timeouts internally, for example the LessTif menu bar, or the - Xaw3d scroll bar. When Xt timouts aren't processed, these - widgets don't behave normally. */ - { - EMACS_TIME interval; - EMACS_SET_SECS_USECS (interval, 0, 100000); - start_atimer (ATIMER_CONTINUOUS, interval, x_process_timeouts, 0); - } #endif #ifdef USE_TOOLKIT_SCROLL_BARS -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Bug reporting: http://cygwin.com/bugs.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/