diff options
| author | Nickolas Lloyd | 2017-02-01 22:31:55 -0500 |
|---|---|---|
| committer | Nickolas Lloyd | 2017-02-01 22:31:55 -0500 |
| commit | 9a15b5509abb49a11c97c1101ad216f4ef258368 (patch) | |
| tree | 7311337d92833cb8f233eaa696a967a15a306a80 /src/lisp.h | |
| parent | 5d8f2548ceaa5a0b33c08a39f1d6c11071ec63aa (diff) | |
| parent | 70d36dda26465b43c1a63e8e13153e070af86456 (diff) | |
| download | emacs-nick.lloyd-bytecode-jit.tar.gz emacs-nick.lloyd-bytecode-jit.zip | |
Merge branch 'master' into nick.lloyd-bytecode-jitnick.lloyd-bytecode-jit
Diffstat (limited to 'src/lisp.h')
| -rw-r--r-- | src/lisp.h | 42 |
1 files changed, 20 insertions, 22 deletions
diff --git a/src/lisp.h b/src/lisp.h index a29335904fd..44b59f6bac5 100644 --- a/src/lisp.h +++ b/src/lisp.h | |||
| @@ -1995,8 +1995,8 @@ struct Lisp_Hash_Table | |||
| 1995 | hash table size to reduce collisions. */ | 1995 | hash table size to reduce collisions. */ |
| 1996 | Lisp_Object index; | 1996 | Lisp_Object index; |
| 1997 | 1997 | ||
| 1998 | /* Non-nil if the table can be purecopied. Any changes the table after | 1998 | /* Non-nil if the table can be purecopied. The table cannot be |
| 1999 | purecopy will result in an error. */ | 1999 | changed afterwards. */ |
| 2000 | Lisp_Object pure; | 2000 | Lisp_Object pure; |
| 2001 | 2001 | ||
| 2002 | /* Only the fields above are traced normally by the GC. The ones below | 2002 | /* Only the fields above are traced normally by the GC. The ones below |
| @@ -3132,29 +3132,28 @@ struct handler | |||
| 3132 | 3132 | ||
| 3133 | extern Lisp_Object memory_signal_data; | 3133 | extern Lisp_Object memory_signal_data; |
| 3134 | 3134 | ||
| 3135 | /* Check quit-flag and quit if it is non-nil. Typing C-g does not | 3135 | extern void maybe_quit (void); |
| 3136 | directly cause a quit; it only sets Vquit_flag. So the program | ||
| 3137 | needs to call maybe_quit at times when it is safe to quit. Every | ||
| 3138 | loop that might run for a long time or might not exit ought to call | ||
| 3139 | maybe_quit at least once, at a safe place. Unless that is | ||
| 3140 | impossible, of course. But it is very desirable to avoid creating | ||
| 3141 | loops where maybe_quit is impossible. | ||
| 3142 | 3136 | ||
| 3143 | Exception: if you set immediate_quit, the handler that responds to | 3137 | /* True if ought to quit now. */ |
| 3144 | the C-g does the quit itself. This is a good thing to do around a | ||
| 3145 | loop that has no side effects and (in particular) cannot call | ||
| 3146 | arbitrary Lisp code. | ||
| 3147 | 3138 | ||
| 3148 | If quit-flag is set to `kill-emacs' the SIGINT handler has received | 3139 | #define QUITP (!NILP (Vquit_flag) && NILP (Vinhibit_quit)) |
| 3149 | a request to exit Emacs when it is safe to do. | ||
| 3150 | 3140 | ||
| 3151 | When not quitting, process any pending signals. */ | 3141 | /* Heuristic on how many iterations of a tight loop can be safely done |
| 3142 | before it's time to do a quit. This must be a power of 2. It | ||
| 3143 | is nice but not necessary for it to equal USHRT_MAX + 1. */ | ||
| 3152 | 3144 | ||
| 3153 | extern void maybe_quit (void); | 3145 | enum { QUIT_COUNT_HEURISTIC = 1 << 16 }; |
| 3154 | 3146 | ||
| 3155 | /* True if ought to quit now. */ | 3147 | /* Process a quit rarely, based on a counter COUNT, for efficiency. |
| 3148 | "Rarely" means once per QUIT_COUNT_HEURISTIC or per USHRT_MAX + 1 | ||
| 3149 | times, whichever is smaller (somewhat arbitrary, but often faster). */ | ||
| 3156 | 3150 | ||
| 3157 | #define QUITP (!NILP (Vquit_flag) && NILP (Vinhibit_quit)) | 3151 | INLINE void |
| 3152 | rarely_quit (unsigned short int count) | ||
| 3153 | { | ||
| 3154 | if (! (count & (QUIT_COUNT_HEURISTIC - 1))) | ||
| 3155 | maybe_quit (); | ||
| 3156 | } | ||
| 3158 | 3157 | ||
| 3159 | extern Lisp_Object Vascii_downcase_table; | 3158 | extern Lisp_Object Vascii_downcase_table; |
| 3160 | extern Lisp_Object Vascii_canon_table; | 3159 | extern Lisp_Object Vascii_canon_table; |
| @@ -4233,8 +4232,10 @@ extern int emacs_open (const char *, int, int); | |||
| 4233 | extern int emacs_pipe (int[2]); | 4232 | extern int emacs_pipe (int[2]); |
| 4234 | extern int emacs_close (int); | 4233 | extern int emacs_close (int); |
| 4235 | extern ptrdiff_t emacs_read (int, void *, ptrdiff_t); | 4234 | extern ptrdiff_t emacs_read (int, void *, ptrdiff_t); |
| 4235 | extern ptrdiff_t emacs_read_quit (int, void *, ptrdiff_t); | ||
| 4236 | extern ptrdiff_t emacs_write (int, void const *, ptrdiff_t); | 4236 | extern ptrdiff_t emacs_write (int, void const *, ptrdiff_t); |
| 4237 | extern ptrdiff_t emacs_write_sig (int, void const *, ptrdiff_t); | 4237 | extern ptrdiff_t emacs_write_sig (int, void const *, ptrdiff_t); |
| 4238 | extern ptrdiff_t emacs_write_quit (int, void const *, ptrdiff_t); | ||
| 4238 | extern void emacs_perror (char const *); | 4239 | extern void emacs_perror (char const *); |
| 4239 | 4240 | ||
| 4240 | extern void unlock_all_files (void); | 4241 | extern void unlock_all_files (void); |
| @@ -4360,9 +4361,6 @@ extern char my_edata[]; | |||
| 4360 | extern char my_endbss[]; | 4361 | extern char my_endbss[]; |
| 4361 | extern char *my_endbss_static; | 4362 | extern char *my_endbss_static; |
| 4362 | 4363 | ||
| 4363 | /* True means ^G can quit instantly. */ | ||
| 4364 | extern bool immediate_quit; | ||
| 4365 | |||
| 4366 | extern void *xmalloc (size_t) ATTRIBUTE_MALLOC_SIZE ((1)); | 4364 | extern void *xmalloc (size_t) ATTRIBUTE_MALLOC_SIZE ((1)); |
| 4367 | extern void *xzalloc (size_t) ATTRIBUTE_MALLOC_SIZE ((1)); | 4365 | extern void *xzalloc (size_t) ATTRIBUTE_MALLOC_SIZE ((1)); |
| 4368 | extern void *xrealloc (void *, size_t) ATTRIBUTE_ALLOC_SIZE ((2)); | 4366 | extern void *xrealloc (void *, size_t) ATTRIBUTE_ALLOC_SIZE ((2)); |