emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Lisp object allocations during asynchronous input handling


From: YAMAMOTO Mitsuharu
Subject: Lisp object allocations during asynchronous input handling
Date: Mon, 28 Nov 2005 11:34:32 +0900
User-agent: Wanderlust/2.14.0 (Africa) SEMI/1.14.6 (Maruoka) FLIM/1.14.6 (Marutamachi) APEL/10.6 Emacs/22.0.50 (sparc-sun-solaris2.8) MULE/5.0 (SAKAKI)

Forgive me if this issue has already been discussed.

A comment in src/termhooks.h says:

  /* Additional event argument.  This is used for TOOL_BAR_EVENTs and
     HELP_EVENTs and avoids calling Fcons during signal handling.  */
  Lisp_Object arg;

According to this, allocating Lisp objects during asynchronous input
handling seems to be evil.  Actually they operate on global variables
and thus not reentrant.  (Correct me if I'm wrong.)

However, drag-and-drop handling functions on any window systems (e.g.,
x_handle_dnd_message in xselect.c) are doing this kind of allocations
in order to cope with multiple dnd items.  And I can find other such
places in the Carbon port.  Actually, I made some of them without
noticing this issue.

So, my question is: should we make an effort to eliminate such parts
now?  I'm not sure how much they cause real problems.  And if
SYNC_INPUT will be defined in future, we won't need to worry about
such kind of allocations.

                                     YAMAMOTO Mitsuharu
                                address@hidden




reply via email to

[Prev in Thread] Current Thread [Next in Thread]