diff src/alloc.c @ 90737:95d0cdf160ea

Merge from emacs--devo--0 Patches applied: * emacs--devo--0 (patch 586-614) - Update from CVS - Update from erc--emacs--22 - Merge from gnus--rel--5.10 - Merge from erc--main--0 - Make byte compiler correctly write circular constants * gnus--rel--5.10 (patch 186-196) - Update from CVS - Merge from emacs--devo--0 Revision: emacs@sv.gnu.org/emacs--unicode--0--patch-162
author Miles Bader <miles@gnu.org>
date Fri, 26 Jan 2007 06:16:11 +0000
parents dbe3f29e61d6 3d45362f1d38
children f83d17e1ace6
line wrap: on
line diff
--- a/src/alloc.c	Fri Jan 26 02:30:28 2007 +0000
+++ b/src/alloc.c	Fri Jan 26 06:16:11 2007 +0000
@@ -1,6 +1,6 @@
 /* Storage allocation and gc for GNU Emacs Lisp interpreter.
    Copyright (C) 1985, 1986, 1988, 1993, 1994, 1995, 1997, 1998, 1999,
-      2000, 2001, 2002, 2003, 2004, 2005, 2006  Free Software Foundation, Inc.
+      2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007  Free Software Foundation, Inc.
 
 This file is part of GNU Emacs.
 
@@ -127,21 +127,21 @@
 
 static pthread_mutex_t alloc_mutex;
 
-#define BLOCK_INPUT_ALLOC                       \
-  do                                            \
-    {                                           \
-      if (pthread_self () == main_thread)	\
-	BLOCK_INPUT;				\
-      pthread_mutex_lock (&alloc_mutex);	\
-    }                                           \
+#define BLOCK_INPUT_ALLOC                               \
+  do                                                    \
+    {                                                   \
+      if (pthread_equal (pthread_self (), main_thread)) \
+        sigblock (sigmask (SIGIO));                     \
+      pthread_mutex_lock (&alloc_mutex);                \
+    }                                                   \
   while (0)
-#define UNBLOCK_INPUT_ALLOC                     \
-  do                                            \
-    {                                           \
-      pthread_mutex_unlock (&alloc_mutex);	\
-      if (pthread_self () == main_thread)	\
-	UNBLOCK_INPUT;				\
-    }                                           \
+#define UNBLOCK_INPUT_ALLOC                             \
+  do                                                    \
+    {                                                   \
+      pthread_mutex_unlock (&alloc_mutex);              \
+      if (pthread_equal (pthread_self (), main_thread)) \
+        sigunblock (sigmask (SIGIO));                   \
+    }                                                   \
   while (0)
 
 #else /* SYSTEM_MALLOC || not HAVE_GTK_AND_PTHREAD */