Mercurial > emacs
diff src/alloc.c @ 90580:7f3f771c85fa
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
| author | Miles Bader <miles@gnu.org> |
|---|---|
| date | Wed, 16 Aug 2006 14:08:49 +0000 |
| parents | dc93015fb8de 428ee64b35d5 |
| children | 6823a91487f2 |
line wrap: on
line diff
--- a/src/alloc.c Mon Aug 07 06:45:41 2006 +0000 +++ b/src/alloc.c Wed Aug 16 14:08:49 2006 +0000 @@ -80,6 +80,7 @@ #ifdef WINDOWSNT #include <fcntl.h> +#include "w32.h" #endif #ifdef DOUG_LEA_MALLOC @@ -129,17 +130,27 @@ #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 @@ 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 @@ } return -1; +#endif } /* Return 1 if OBJ is a valid lisp object.
