]> git.eshelyaron.com Git - emacs.git/commitdiff
(BLOCK_INPUT_ALLOC, UNBLOCK_INPUT_ALLOC): Use pthread_equal,
authorJan Djärv <jan.h.d@swipnet.se>
Thu, 11 Jan 2007 19:22:04 +0000 (19:22 +0000)
committerJan Djärv <jan.h.d@swipnet.se>
Thu, 11 Jan 2007 19:22:04 +0000 (19:22 +0000)
block/unblock SIGIO.

src/ChangeLog
src/alloc.c

index 1974d45dd2c5738b40bb93f992d856b2bbf27a71..821eb25f6cf02e7a5e7494c828cb6b8d863640a6 100644 (file)
@@ -1,3 +1,8 @@
+2007-01-11  Jan Dj\e,Ad\e(Brv  <jan.h.d@swipnet.se>
+
+       * alloc.c (BLOCK_INPUT_ALLOC, UNBLOCK_INPUT_ALLOC): Use pthread_equal,
+       block/unblock SIGIO.
+
 2007-01-10  Stefan Monnier  <monnier@iro.umontreal.ca>
 
        * editfns.c (Fformat): Allow integer-format to work with floats of size
index f3ca3e71a2926f7ac8ae3d819f6d338018f63963..926d2706e8fed14501b7bf5b721dce93c2fa83b2 100644 (file)
@@ -127,21 +127,21 @@ extern __malloc_size_t __malloc_extra_blocks;
 
 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 */