summaryrefslogtreecommitdiff
path: root/src/alloc.c
diff options
context:
space:
mode:
authorMiles Bader <miles@gnu.org>2006-08-16 14:08:49 +0000
committerMiles Bader <miles@gnu.org>2006-08-16 14:08:49 +0000
commitde20e0ccdb039a2ac27e5bbd3e06ab70c4e7bb65 (patch)
tree80243ce02b52cbf7945c614bd213dd63142b861a /src/alloc.c
parent7a5c2a42040b12b037940a067aee6ac6fde01680 (diff)
parent5ebdc2990a95cc38b21f772eea4de3ceee149e54 (diff)
Merge from emacs--devo--0
Patches applied: * emacs--devo--0 (patch 382-398) - Update from CVS - Update from erc--emacs--22 - Fix ERC bug introduced in last patch - Merge from gnus--rel--5.10 * gnus--rel--5.10 (patch 123-125) - Update from CVS Revision: emacs@sv.gnu.org/emacs--unicode--0--patch-101
Diffstat (limited to 'src/alloc.c')
-rw-r--r--src/alloc.c27
1 files changed, 21 insertions, 6 deletions
diff --git a/src/alloc.c b/src/alloc.c
index 171cdade81a..9cd87503c5a 100644
--- a/src/alloc.c
+++ b/src/alloc.c
@@ -80,6 +80,7 @@ extern POINTER_TYPE *sbrk ();
#ifdef WINDOWSNT
#include <fcntl.h>
+#include "w32.h"
#endif
#ifdef DOUG_LEA_MALLOC
@@ -129,17 +130,27 @@ static pthread_mutex_t alloc_mutex;
#define BLOCK_INPUT_ALLOC \
do \
{ \
- pthread_mutex_lock (&alloc_mutex); \
- if (pthread_self () == main_thread) \
- BLOCK_INPUT; \
+ if (!in_sighandler) \
+ { \
+ pthread_mutex_lock (&alloc_mutex); \
+ if (pthread_self () == main_thread) \
+ BLOCK_INPUT; \
+ else \
+ sigblock (sigmask (SIGIO)); \
+ } \
} \
while (0)
#define UNBLOCK_INPUT_ALLOC \
do \
{ \
- if (pthread_self () == main_thread) \
- UNBLOCK_INPUT; \
- pthread_mutex_unlock (&alloc_mutex); \
+ if (!in_sighandler) \
+ { \
+ pthread_mutex_unlock (&alloc_mutex); \
+ if (pthread_self () == main_thread) \
+ UNBLOCK_INPUT; \
+ else \
+ sigunblock (sigmask (SIGIO)); \
+ } \
} \
while (0)
@@ -4572,6 +4583,9 @@ int
valid_pointer_p (p)
void *p;
{
+#ifdef WINDOWSNT
+ return w32_valid_pointer_p (p, 16);
+#else
int fd;
/* Obviously, we cannot just access it (we would SEGV trying), so we
@@ -4588,6 +4602,7 @@ valid_pointer_p (p)
}
return -1;
+#endif
}
/* Return 1 if OBJ is a valid lisp object.