aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/ChangeLog10
-rw-r--r--src/emacs.c12
-rw-r--r--src/syssignal.h14
3 files changed, 26 insertions, 10 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index 41f2467664b..ed2059ebd37 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,13 @@
12008-05-14 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
2
3 * emacs.c (main_thread): Conditionalize on
4 FORWARD_SIGNAL_TO_MAIN_THREAD instead of HAVE_GTK_AND_PTHREAD.
5 (main) [FORWARD_SIGNAL_TO_MAIN_THREAD]: Initialize it.
6
7 * syssignal.h (FORWARD_SIGNAL_TO_MAIN_THREAD): New define.
8 (main_thread, SIGNAL_THREAD_CHECK): Conditionalize on
9 FORWARD_SIGNAL_TO_MAIN_THREAD instead of HAVE_GTK_AND_PTHREAD.
10
12008-05-14 Kenichi Handa <handa@m17n.org> 112008-05-14 Kenichi Handa <handa@m17n.org>
2 12
3 * coding.c (detect_coding_iso_2022): Ignore a coding category that 13 * coding.c (detect_coding_iso_2022): Ignore a coding category that
diff --git a/src/emacs.c b/src/emacs.c
index 7074076cf66..c401afafbd7 100644
--- a/src/emacs.c
+++ b/src/emacs.c
@@ -355,10 +355,10 @@ int fatal_error_in_progress;
355 355
356void (*fatal_error_signal_hook) P_ ((void)); 356void (*fatal_error_signal_hook) P_ ((void));
357 357
358#ifdef HAVE_GTK_AND_PTHREAD 358#ifdef FORWARD_SIGNAL_TO_MAIN_THREAD
359/* When compiled with GTK and running under Gnome, multiple threads may be 359/* When compiled with GTK and running under Gnome, or Carbon under Mac
360 created. Keep track of our main thread to make sure signals are delivered 360 OS X, multiple threads may be created. Keep track of our main
361 to it (see syssignal.h). */ 361 thread to make sure signals are delivered to it (see syssignal.h). */
362 362
363pthread_t main_thread; 363pthread_t main_thread;
364#endif 364#endif
@@ -1035,9 +1035,9 @@ main (argc, argv
1035# endif /* not SYNC_INPUT */ 1035# endif /* not SYNC_INPUT */
1036#endif /* not SYSTEM_MALLOC */ 1036#endif /* not SYSTEM_MALLOC */
1037 1037
1038#ifdef HAVE_GTK_AND_PTHREAD 1038#ifdef FORWARD_SIGNAL_TO_MAIN_THREAD
1039 main_thread = pthread_self (); 1039 main_thread = pthread_self ();
1040#endif /* HAVE_GTK_AND_PTHREAD */ 1040#endif /* FORWARD_SIGNAL_TO_MAIN_THREAD */
1041 1041
1042#if defined (MSDOS) || defined (WINDOWSNT) 1042#if defined (MSDOS) || defined (WINDOWSNT)
1043 /* We do all file input/output as binary files. When we need to translate 1043 /* We do all file input/output as binary files. When we need to translate
diff --git a/src/syssignal.h b/src/syssignal.h
index 53877ca107d..0ab4598b507 100644
--- a/src/syssignal.h
+++ b/src/syssignal.h
@@ -21,8 +21,14 @@ Boston, MA 02110-1301, USA. */
21 21
22extern void init_signals P_ ((void)); 22extern void init_signals P_ ((void));
23 23
24#ifdef HAVE_GTK_AND_PTHREAD 24#if defined (HAVE_GTK_AND_PTHREAD) || (defined (HAVE_CARBON) && MAC_OS_X_VERSION_MAX_ALLOWED >= 1020)
25#include <pthread.h> 25#include <pthread.h>
26/* If defined, asynchronous signals delivered to a non-main thread are
27 forwarded to the main thread. */
28#define FORWARD_SIGNAL_TO_MAIN_THREAD
29#endif
30
31#ifdef FORWARD_SIGNAL_TO_MAIN_THREAD
26extern pthread_t main_thread; 32extern pthread_t main_thread;
27#endif 33#endif
28 34
@@ -208,7 +214,7 @@ extern SIGMASKTYPE sigprocmask_set;
208char *strsignal (); 214char *strsignal ();
209#endif 215#endif
210 216
211#ifdef HAVE_GTK_AND_PTHREAD 217#ifdef FORWARD_SIGNAL_TO_MAIN_THREAD
212#define SIGNAL_THREAD_CHECK(signo) \ 218#define SIGNAL_THREAD_CHECK(signo) \
213 do { \ 219 do { \
214 if (!pthread_equal (pthread_self (), main_thread)) \ 220 if (!pthread_equal (pthread_self (), main_thread)) \
@@ -227,8 +233,8 @@ char *strsignal ();
227 } \ 233 } \
228 } while (0) 234 } while (0)
229 235
230#else /* not HAVE_GTK_AND_PTHREAD */ 236#else /* not FORWARD_SIGNAL_TO_MAIN_THREAD */
231#define SIGNAL_THREAD_CHECK(signo) 237#define SIGNAL_THREAD_CHECK(signo)
232#endif /* not HAVE_GTK_AND_PTHREAD */ 238#endif /* not FORWARD_SIGNAL_TO_MAIN_THREAD */
233/* arch-tag: 4580e86a-340d-4574-9e11-a742b6e1a152 239/* arch-tag: 4580e86a-340d-4574-9e11-a742b6e1a152
234 (do not change this comment) */ 240 (do not change this comment) */