From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: storm@cua.dk (Kim F. Storm) Newsgroups: gmane.emacs.devel Subject: Re: alarm_signal_handler is called too frequently Date: Fri, 05 Nov 2004 13:36:20 +0100 Message-ID: References: <7E7ABFB6-2693-11D9-9BC4-000D93505B76@swipnet.se> <41813425.2010001@swipnet.se> <4181EA7E.2020309@swipnet.se> <4185FC85.70100@swipnet.se> <41880288.2070706@swipnet.se> <9AF2796A-2EB2-11D9-A7C3-000D93505B76@swipnet.se> NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1099658217 27393 80.91.229.6 (5 Nov 2004 12:36:57 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Fri, 5 Nov 2004 12:36:57 +0000 (UTC) Cc: rms@gnu.org, mituharu@math.s.chiba-u.ac.jp, emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Nov 05 13:36:47 2004 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1CQ3Kg-0000lz-00 for ; Fri, 05 Nov 2004 13:36:47 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1CQ3Ss-0006qU-JO for ged-emacs-devel@m.gmane.org; Fri, 05 Nov 2004 07:45:14 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.33) id 1CQ3Sg-0006qC-NC for emacs-devel@gnu.org; Fri, 05 Nov 2004 07:45:02 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.33) id 1CQ3Se-0006pt-Mr for emacs-devel@gnu.org; Fri, 05 Nov 2004 07:45:00 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1CQ3Se-0006pq-KR for emacs-devel@gnu.org; Fri, 05 Nov 2004 07:45:00 -0500 Original-Received: from [212.88.64.25] (helo=mail-relay.sonofon.dk) by monty-python.gnu.org with smtp (Exim 4.34) id 1CQ3K6-0007Ng-MY for emacs-devel@gnu.org; Fri, 05 Nov 2004 07:36:11 -0500 Original-Received: (qmail 15689 invoked from network); 5 Nov 2004 12:36:09 -0000 Original-Received: from unknown (HELO kfs-l.imdomain.dk.cua.dk) (213.83.150.2) by 0 with SMTP; 5 Nov 2004 12:36:09 -0000 Original-To: "Jan D." In-Reply-To: <9AF2796A-2EB2-11D9-A7C3-000D93505B76@swipnet.se> (Jan D.'s message of "Thu, 4 Nov 2004 23:41:02 +0100") User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/21.3.50 (gnu/linux) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: main.gmane.org gmane.emacs.devel:29458 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:29458 I don't get it either. Why is it unsafe to Feval with input blocked? Actually, to me it seems to be safer to do it while input is blocked! "Jan D." writes: > I made my question very unclear, I'll try again. Sorry if this is > obvious for others, but I just don't understand. > > Say we have three functions, aL, bL and cL, all written in Lisp (hence > the L). Now, obviously aL calling bL calling cL is safe (<-- denotes > return, not cL calls bL). > > 1: > > aL bL cL > | --> | | > | | --> | > | | <-- | > | <-- | | > > If we replace bL with code in C instead, is this safe? > > 2: > > aL bC cL > | --> | | > | | --> | > | | <-- | > | <-- | | > > I think it must be, there are places in Emacs where C code calls Lisp > functions. Say now that bC calls cL within BLOCK/UNBLOCK_INPUT: > > 3: > > aL bC cL > | --> | | > | BLOCK | > | | --> | > | | <-- | > | UNBLOCK | > | <-- | | > > Why is this unsafe, if 2 was safe (if indeed it is)? It is not as > though the signal handler is calling Lisp code, that is obviously > unsafe. But when a dialog or popup menu is popped up, the signal > handler is not involved in processing X events, it is all done inside > bC. > > I'm sorry if this is a stupid question, but I just don't get it. > > Jan D. > -- Kim F. Storm http://www.cua.dk