]> git.eshelyaron.com Git - emacs.git/commitdiff
(FORWARD_SIGNAL_TO_MAIN_THREAD): New define.
authorYAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
Mon, 12 May 2008 08:30:56 +0000 (08:30 +0000)
committerYAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
Mon, 12 May 2008 08:30:56 +0000 (08:30 +0000)
(main_thread, SIGNAL_THREAD_CHECK): Conditionalize on
FORWARD_SIGNAL_TO_MAIN_THREAD instead of HAVE_GTK_AND_PTHREAD.

src/ChangeLog
src/syssignal.h

index 0cb3994844b29fa6ae111c1bab11b0b108248812..dc4198045b8ce48e56c720304daafb4c26af4873 100644 (file)
@@ -1,3 +1,13 @@
+2008-05-12  YAMAMOTO Mitsuharu  <mituharu@math.s.chiba-u.ac.jp>
+
+       * emacs.c (main_thread): Conditionalize on
+       FORWARD_SIGNAL_TO_MAIN_THREAD instead of HAVE_GTK_AND_PTHREAD.
+       (main) [FORWARD_SIGNAL_TO_MAIN_THREAD]: Initialize it.
+
+       * syssignal.h (FORWARD_SIGNAL_TO_MAIN_THREAD): New define.
+       (main_thread, SIGNAL_THREAD_CHECK): Conditionalize on
+       FORWARD_SIGNAL_TO_MAIN_THREAD instead of HAVE_GTK_AND_PTHREAD.
+
 2008-05-10  Eli Zaretskii  <eliz@gnu.org>
 
        * dired.c (Fdirectory_files_and_attributes, Ffile_attributes):
@@ -77,7 +87,7 @@
        Likewise.
 
        * mactoolbox.c (Vmac_ts_active_input_buf) [USE_MAC_TSM]: Add extern.
-       (fast_find_position, x_y_to_hpos_vpos, mac_ax_selected_text_range):
+       (fast_find_position, x_y_to_hpos_vpos, mac_ax_selected_text_range)
        (mac_ax_number_of_characters): Add externs.
        (mac_get_selected_range, mac_store_buffer_text_to_unicode_chars)
        [USE_MAC_TSM]: Likewise.
        (create_apple_event, mac_event_parameters_to_lisp)
        [TARGET_API_MAC_CARBON]: Add externs.
 
-       * mactoolbox.c: (Vmac_ts_script_language_on_focus)
+       * mactoolbox.c (Vmac_ts_script_language_on_focus)
        (saved_ts_script_language_on_focus) [USE_MAC_TSM]: Remove externs.
        (XTread_socket) [USE_MAC_TOOLBAR]: Select window if its structure part
        is clicked.
        (syms_of_macselect) <Vmac_dnd_known_types>:
        Use mac_dnd_default_known_types.
 
-       * macterm.c (mac_end_cg_clip): Add argument F.  All uses changed.
+       * macterm.c (mac_end_clip): Add argument F.  All uses changed.
        (mac_begin_cg_clip, mac_end_cg_clip): Allow null GC.
        (mac_invert_rectangle, mac_compute_glyph_string_overhangs)
        (mac_load_query_font): Use them instead of SetPortWindowPort.
index a01d5bff302a1b19b4d491e4be47f600e7be8d0b..13710d3104b75615f0745faeaefe13275b7a451e 100644 (file)
@@ -21,8 +21,14 @@ Boston, MA 02110-1301, USA.  */
 
 extern void init_signals P_ ((void));
 
-#ifdef HAVE_GTK_AND_PTHREAD
+#if defined (HAVE_GTK_AND_PTHREAD) || (defined (HAVE_CARBON) && MAC_OS_X_VERSION_MAX_ALLOWED >= 1020)
 #include <pthread.h>
+/* If defined, asynchronous signals delivered to a non-main thread are
+   forwarded to the main thread.  */
+#define FORWARD_SIGNAL_TO_MAIN_THREAD
+#endif
+
+#ifdef FORWARD_SIGNAL_TO_MAIN_THREAD
 extern pthread_t main_thread;
 #endif
 
@@ -207,7 +213,7 @@ extern SIGMASKTYPE sigprocmask_set;
 char *strsignal ();
 #endif
 
-#ifdef HAVE_GTK_AND_PTHREAD
+#ifdef FORWARD_SIGNAL_TO_MAIN_THREAD
 #define SIGNAL_THREAD_CHECK(signo)                                      \
   do {                                                                  \
     if (!pthread_equal (pthread_self (), main_thread))                 \
@@ -226,8 +232,8 @@ char *strsignal ();
       }                                                                 \
    } while (0)
 
-#else /* not HAVE_GTK_AND_PTHREAD */
+#else /* not FORWARD_SIGNAL_TO_MAIN_THREAD */
 #define SIGNAL_THREAD_CHECK(signo)
-#endif /* not HAVE_GTK_AND_PTHREAD */
+#endif /* not FORWARD_SIGNAL_TO_MAIN_THREAD */
 /* arch-tag: 4580e86a-340d-4574-9e11-a742b6e1a152
    (do not change this comment) */