diff options
| author | Richard M. Stallman | 2005-03-06 15:59:44 +0000 |
|---|---|---|
| committer | Richard M. Stallman | 2005-03-06 15:59:44 +0000 |
| commit | 835ee136c54348a61f5b5d2ef34de05e5c3476ed (patch) | |
| tree | e430d527b0af5c700f9a22ef469f3b048f9c0ddf /src | |
| parent | a3194d032da47473c0e3741b4616cb63353258b4 (diff) | |
| download | emacs-835ee136c54348a61f5b5d2ef34de05e5c3476ed.tar.gz emacs-835ee136c54348a61f5b5d2ef34de05e5c3476ed.zip | |
(UNBLOCK_INPUT_TO): New macro.
(TOTALLY_UNBLOCK_INPUT): Handle a pending signal if any.
Diffstat (limited to 'src')
| -rw-r--r-- | src/blockinput.h | 25 |
1 files changed, 24 insertions, 1 deletions
diff --git a/src/blockinput.h b/src/blockinput.h index a4c8a9b9c22..a3b50d2a0f2 100644 --- a/src/blockinput.h +++ b/src/blockinput.h | |||
| @@ -94,7 +94,30 @@ extern int pending_atimers; | |||
| 94 | } \ | 94 | } \ |
| 95 | while (0) | 95 | while (0) |
| 96 | 96 | ||
| 97 | #define TOTALLY_UNBLOCK_INPUT (interrupt_input_blocked = 0) | 97 | /* Undo any number of BLOCK_INPUT calls, |
| 98 | and also reinvoke any pending signal. */ | ||
| 99 | |||
| 100 | #define TOTALLY_UNBLOCK_INPUT \ | ||
| 101 | if (interrupt_input_blocked != 0) \ | ||
| 102 | { \ | ||
| 103 | interrupt_input_blocked = 1; \ | ||
| 104 | UNBLOCK_INPUT; \ | ||
| 105 | } \ | ||
| 106 | else | ||
| 107 | |||
| 108 | /* Undo any number of BLOCK_INPUT calls down to level LEVEL, | ||
| 109 | and also (if the level is now 0) reinvoke any pending signal. */ | ||
| 110 | |||
| 111 | #define UNBLOCK_INPUT_TO(LEVEL) \ | ||
| 112 | do \ | ||
| 113 | { \ | ||
| 114 | int oldlevel = interrupt_input_blocked; \ | ||
| 115 | interrupt_input_blocked = (LEVEL) + 1; \ | ||
| 116 | if (interrupt_input_blocked != oldlevel + 1) \ | ||
| 117 | UNBLOCK_INPUT; \ | ||
| 118 | } \ | ||
| 119 | while (0) | ||
| 120 | |||
| 98 | #define UNBLOCK_INPUT_RESIGNAL UNBLOCK_INPUT | 121 | #define UNBLOCK_INPUT_RESIGNAL UNBLOCK_INPUT |
| 99 | 122 | ||
| 100 | /* In critical section ? */ | 123 | /* In critical section ? */ |