diff options
| author | Tom Tromey | 2012-08-15 13:01:36 -0600 |
|---|---|---|
| committer | Tom Tromey | 2012-08-15 13:01:36 -0600 |
| commit | 2d525b793f1b0fd2b6f66881310bec8684bceffe (patch) | |
| tree | 932fb8b75974ac4c16ecfc5bc216fe362b0a4d27 /src/thread.h | |
| parent | 68b32482437e05f0994c4dd0ab5b0c27d39f0f6d (diff) | |
| download | emacs-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/thread.h')
| -rw-r--r-- | src/thread.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/thread.h b/src/thread.h index b2eb04d42e8..6d61d0e5fcf 100644 --- a/src/thread.h +++ b/src/thread.h | |||
| @@ -133,8 +133,13 @@ struct thread_state | |||
| 133 | /* Regexp to use to replace spaces, or NULL meaning don't. */ | 133 | /* Regexp to use to replace spaces, or NULL meaning don't. */ |
| 134 | /*re_char*/ unsigned char *m_whitespace_regexp; | 134 | /*re_char*/ unsigned char *m_whitespace_regexp; |
| 135 | #define whitespace_regexp (current_thread->m_whitespace_regexp) | 135 | #define whitespace_regexp (current_thread->m_whitespace_regexp) |
| 136 | |||
| 137 | /* Threads are kept on a linked list. */ | ||
| 138 | struct thread_state *next_thread; | ||
| 136 | }; | 139 | }; |
| 137 | 140 | ||
| 138 | extern struct thread_state *current_thread; | 141 | extern struct thread_state *current_thread; |
| 139 | 142 | ||
| 143 | extern void unmark_threads (void); | ||
| 144 | |||
| 140 | #endif /* THREAD_H */ | 145 | #endif /* THREAD_H */ |