Commit 835ee136 authored by Richard M. Stallman's avatar Richard M. Stallman
Browse files

(UNBLOCK_INPUT_TO): New macro.

(TOTALLY_UNBLOCK_INPUT): Handle a pending signal if any.
parent a3194d03
...@@ -94,7 +94,30 @@ extern int pending_atimers; ...@@ -94,7 +94,30 @@ extern int pending_atimers;
} \ } \
while (0) while (0)
#define TOTALLY_UNBLOCK_INPUT (interrupt_input_blocked = 0) /* Undo any number of BLOCK_INPUT calls,
and also reinvoke any pending signal. */
#define TOTALLY_UNBLOCK_INPUT \
if (interrupt_input_blocked != 0) \
{ \
interrupt_input_blocked = 1; \
UNBLOCK_INPUT; \
} \
else
/* Undo any number of BLOCK_INPUT calls down to level LEVEL,
and also (if the level is now 0) reinvoke any pending signal. */
#define UNBLOCK_INPUT_TO(LEVEL) \
do \
{ \
int oldlevel = interrupt_input_blocked; \
interrupt_input_blocked = (LEVEL) + 1; \
if (interrupt_input_blocked != oldlevel + 1) \
UNBLOCK_INPUT; \
} \
while (0)
#define UNBLOCK_INPUT_RESIGNAL UNBLOCK_INPUT #define UNBLOCK_INPUT_RESIGNAL UNBLOCK_INPUT
/* In critical section ? */ /* In critical section ? */
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment