aboutsummaryrefslogtreecommitdiffstats
path: root/src/lisp.h
diff options
context:
space:
mode:
authorTom Tromey2012-08-15 13:01:36 -0600
committerTom Tromey2012-08-15 13:01:36 -0600
commit2d525b793f1b0fd2b6f66881310bec8684bceffe (patch)
tree932fb8b75974ac4c16ecfc5bc216fe362b0a4d27 /src/lisp.h
parent68b32482437e05f0994c4dd0ab5b0c27d39f0f6d (diff)
downloademacs-2d525b793f1b0fd2b6f66881310bec8684bceffe.tar.gz
emacs-2d525b793f1b0fd2b6f66881310bec8684bceffe.zip
This parameterizes the GC a bit to make it thread-ready.
The basic idea is that whenever a thread "exits lisp" -- that is, releases the global lock in favor of another thread -- it must save its stack boundaries in the thread object. This way the boundaries are always available for marking. This is the purpose of flush_stack_call_func. I haven't tested this under all the possible GC configurations. There is a new FIXME in a spot that i didn't convert. Arguably all_threads should go in the previous patch.
Diffstat (limited to 'src/lisp.h')
-rw-r--r--src/lisp.h18
1 files changed, 13 insertions, 5 deletions
diff --git a/src/lisp.h b/src/lisp.h
index 0367d9938b7..a6665320da6 100644
--- a/src/lisp.h
+++ b/src/lisp.h
@@ -2715,6 +2715,10 @@ extern void mark_object (Lisp_Object);
2715#if defined REL_ALLOC && !defined SYSTEM_MALLOC 2715#if defined REL_ALLOC && !defined SYSTEM_MALLOC
2716extern void refill_memory_reserve (void); 2716extern void refill_memory_reserve (void);
2717#endif 2717#endif
2718#if GC_MARK_STACK
2719extern void mark_stack (char *, char *);
2720#endif
2721extern void flush_stack_call_func (void (*func) (void *arg), void *arg);
2718extern const char *pending_malloc_warning; 2722extern const char *pending_malloc_warning;
2719extern Lisp_Object zero_vector; 2723extern Lisp_Object zero_vector;
2720extern EMACS_INT consing_since_gc; 2724extern EMACS_INT consing_since_gc;
@@ -2902,6 +2906,10 @@ extern Lisp_Object Vautoload_queue;
2902extern Lisp_Object Vsignaling_function; 2906extern Lisp_Object Vsignaling_function;
2903extern Lisp_Object inhibit_lisp_code; 2907extern Lisp_Object inhibit_lisp_code;
2904extern int handling_signal; 2908extern int handling_signal;
2909#if (GC_MARK_STACK == GC_MAKE_GCPROS_NOOPS \
2910 || GC_MARK_STACK == GC_MARK_STACK_CHECK_GCPROS)
2911extern void mark_catchlist (struct catchtag *);
2912#endif
2905/* To run a normal hook, use the appropriate function from the list below. 2913/* To run a normal hook, use the appropriate function from the list below.
2906 The calling convention: 2914 The calling convention:
2907 2915
@@ -2951,11 +2959,11 @@ extern Lisp_Object safe_call (ptrdiff_t, Lisp_Object, ...);
2951extern Lisp_Object safe_call1 (Lisp_Object, Lisp_Object); 2959extern Lisp_Object safe_call1 (Lisp_Object, Lisp_Object);
2952extern Lisp_Object safe_call2 (Lisp_Object, Lisp_Object, Lisp_Object); 2960extern Lisp_Object safe_call2 (Lisp_Object, Lisp_Object, Lisp_Object);
2953extern void init_eval (void); 2961extern void init_eval (void);
2954#if BYTE_MARK_STACK
2955extern void mark_backtrace (void);
2956#endif
2957extern void syms_of_eval (void); 2962extern void syms_of_eval (void);
2958 2963
2964/* Defined in thread.c. */
2965extern void mark_threads (void);
2966
2959/* Defined in editfns.c. */ 2967/* Defined in editfns.c. */
2960extern Lisp_Object Qfield; 2968extern Lisp_Object Qfield;
2961extern void insert1 (Lisp_Object); 2969extern void insert1 (Lisp_Object);
@@ -3211,9 +3219,9 @@ extern int read_bytecode_char (int);
3211extern Lisp_Object Qbytecode; 3219extern Lisp_Object Qbytecode;
3212extern void syms_of_bytecode (void); 3220extern void syms_of_bytecode (void);
3213#if BYTE_MARK_STACK 3221#if BYTE_MARK_STACK
3214extern void mark_byte_stack (void); 3222extern void mark_byte_stack (struct byte_stack *);
3215#endif 3223#endif
3216extern void unmark_byte_stack (void); 3224extern void unmark_byte_stack (struct byte_stack *);
3217extern Lisp_Object exec_byte_code (Lisp_Object, Lisp_Object, Lisp_Object, 3225extern Lisp_Object exec_byte_code (Lisp_Object, Lisp_Object, Lisp_Object,
3218 Lisp_Object, ptrdiff_t, Lisp_Object *); 3226 Lisp_Object, ptrdiff_t, Lisp_Object *);
3219 3227