diff options
| author | Bill Wohler | 2014-02-23 18:04:35 -0800 |
|---|---|---|
| committer | Bill Wohler | 2014-02-23 18:04:35 -0800 |
| commit | 3e93bafb95608467e438ba7f725fd1f020669f8c (patch) | |
| tree | f2f90109f283e06a18caea3cb2a2623abcfb3a92 /src/blockinput.h | |
| parent | 791c0d7634e44bb92ca85af605be84ff2ae08963 (diff) | |
| parent | e918e27fdf331e89268fc2c9d7cf838d3ecf7aa7 (diff) | |
| download | emacs-3e93bafb95608467e438ba7f725fd1f020669f8c.tar.gz emacs-3e93bafb95608467e438ba7f725fd1f020669f8c.zip | |
Merge from trunk; up to 2014-02-23T23:41:17Z!lekktu@gmail.com.
Diffstat (limited to 'src/blockinput.h')
| -rw-r--r-- | src/blockinput.h | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/src/blockinput.h b/src/blockinput.h index 192c813073d..8303c8c4d36 100644 --- a/src/blockinput.h +++ b/src/blockinput.h | |||
| @@ -1,5 +1,5 @@ | |||
| 1 | /* blockinput.h - interface to blocking complicated interrupt-driven input. | 1 | /* blockinput.h - interface to blocking complicated interrupt-driven input. |
| 2 | Copyright (C) 1989, 1993, 2001-2013 Free Software Foundation, Inc. | 2 | Copyright (C) 1989, 1993, 2001-2014 Free Software Foundation, Inc. |
| 3 | 3 | ||
| 4 | This file is part of GNU Emacs. | 4 | This file is part of GNU Emacs. |
| 5 | 5 | ||
| @@ -20,9 +20,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ | |||
| 20 | #define EMACS_BLOCKINPUT_H | 20 | #define EMACS_BLOCKINPUT_H |
| 21 | 21 | ||
| 22 | INLINE_HEADER_BEGIN | 22 | INLINE_HEADER_BEGIN |
| 23 | #ifndef BLOCKINPUT_INLINE | ||
| 24 | # define BLOCKINPUT_INLINE INLINE | ||
| 25 | #endif | ||
| 26 | 23 | ||
| 27 | /* Emacs should avoid doing anything hairy in a signal handler, because | 24 | /* Emacs should avoid doing anything hairy in a signal handler, because |
| 28 | so many system functions are non-reentrant. For example, malloc | 25 | so many system functions are non-reentrant. For example, malloc |
| @@ -52,7 +49,7 @@ extern volatile int interrupt_input_blocked; | |||
| 52 | 49 | ||
| 53 | /* Begin critical section. */ | 50 | /* Begin critical section. */ |
| 54 | 51 | ||
| 55 | BLOCKINPUT_INLINE void | 52 | INLINE void |
| 56 | block_input (void) | 53 | block_input (void) |
| 57 | { | 54 | { |
| 58 | interrupt_input_blocked++; | 55 | interrupt_input_blocked++; |
| @@ -62,12 +59,12 @@ extern void unblock_input (void); | |||
| 62 | extern void totally_unblock_input (void); | 59 | extern void totally_unblock_input (void); |
| 63 | extern void unblock_input_to (int); | 60 | extern void unblock_input_to (int); |
| 64 | 61 | ||
| 65 | /* In critical section ? */ | 62 | /* In critical section? */ |
| 66 | 63 | ||
| 67 | BLOCKINPUT_INLINE bool | 64 | INLINE bool |
| 68 | input_blocked_p (void) | 65 | input_blocked_p (void) |
| 69 | { | 66 | { |
| 70 | return 0 < interrupt_input_blocked; | 67 | return interrupt_input_blocked > 0; |
| 71 | } | 68 | } |
| 72 | 69 | ||
| 73 | INLINE_HEADER_END | 70 | INLINE_HEADER_END |