diff options
| author | Tom Tromey | 2012-08-15 12:56:38 -0600 |
|---|---|---|
| committer | Tom Tromey | 2012-08-15 12:56:38 -0600 |
| commit | 68b32482437e05f0994c4dd0ab5b0c27d39f0f6d (patch) | |
| tree | fe01584b00d03559210438ebc608a1d170ee00b3 /src/alloc.c | |
| parent | 5190da91e6ca41287190693a8999a6919a9cd8e6 (diff) | |
| download | emacs-68b32482437e05f0994c4dd0ab5b0c27d39f0f6d.tar.gz emacs-68b32482437e05f0994c4dd0ab5b0c27d39f0f6d.zip | |
This introduces a thread-state object and moves various C globals
there. It also introduces #defines for these globals to avoid a
monster patch.
The #defines mean that this patch also has to rename a few fields
whose names clash with the defines.
There is currently just a single "thread"; so this patch does not
impact Emacs behavior in any significant way.
Diffstat (limited to 'src/alloc.c')
| -rw-r--r-- | src/alloc.c | 12 |
1 files changed, 2 insertions, 10 deletions
diff --git a/src/alloc.c b/src/alloc.c index 1d484d4a322..bdf7b24af04 100644 --- a/src/alloc.c +++ b/src/alloc.c | |||
| @@ -372,10 +372,6 @@ struct mem_node | |||
| 372 | enum mem_type type; | 372 | enum mem_type type; |
| 373 | }; | 373 | }; |
| 374 | 374 | ||
| 375 | /* Base address of stack. Set in main. */ | ||
| 376 | |||
| 377 | Lisp_Object *stack_base; | ||
| 378 | |||
| 379 | /* Root of the tree describing allocated Lisp memory. */ | 375 | /* Root of the tree describing allocated Lisp memory. */ |
| 380 | 376 | ||
| 381 | static struct mem_node *mem_root; | 377 | static struct mem_node *mem_root; |
| @@ -423,10 +419,6 @@ static void check_gcpros (void); | |||
| 423 | # define DEADP(x) 0 | 419 | # define DEADP(x) 0 |
| 424 | #endif | 420 | #endif |
| 425 | 421 | ||
| 426 | /* Recording what needs to be marked for gc. */ | ||
| 427 | |||
| 428 | struct gcpro *gcprolist; | ||
| 429 | |||
| 430 | /* Addresses of staticpro'd variables. Initialize it to a nonzero | 422 | /* Addresses of staticpro'd variables. Initialize it to a nonzero |
| 431 | value; otherwise some compilers put it into BSS. */ | 423 | value; otherwise some compilers put it into BSS. */ |
| 432 | 424 | ||
| @@ -4891,7 +4883,7 @@ mark_stack (void) | |||
| 4891 | Lisp_Object o; | 4883 | Lisp_Object o; |
| 4892 | jmp_buf j; | 4884 | jmp_buf j; |
| 4893 | } j; | 4885 | } j; |
| 4894 | volatile int stack_grows_down_p = (char *) &j > (char *) stack_base; | 4886 | volatile int stack_grows_down_p = (char *) &j > (char *) stack_bottom; |
| 4895 | #endif | 4887 | #endif |
| 4896 | /* This trick flushes the register windows so that all the state of | 4888 | /* This trick flushes the register windows so that all the state of |
| 4897 | the process is contained in the stack. */ | 4889 | the process is contained in the stack. */ |
| @@ -4933,7 +4925,7 @@ mark_stack (void) | |||
| 4933 | /* This assumes that the stack is a contiguous region in memory. If | 4925 | /* This assumes that the stack is a contiguous region in memory. If |
| 4934 | that's not the case, something has to be done here to iterate | 4926 | that's not the case, something has to be done here to iterate |
| 4935 | over the stack segments. */ | 4927 | over the stack segments. */ |
| 4936 | mark_memory (stack_base, end); | 4928 | mark_memory (stack_bottom, end); |
| 4937 | 4929 | ||
| 4938 | /* Allow for marking a secondary stack, like the register stack on the | 4930 | /* Allow for marking a secondary stack, like the register stack on the |
| 4939 | ia64. */ | 4931 | ia64. */ |