aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/alloc.c4
-rw-r--r--src/thread.c6
-rw-r--r--src/thread.h1
3 files changed, 9 insertions, 2 deletions
diff --git a/src/alloc.c b/src/alloc.c
index e979f3631ee..93ea286cfb8 100644
--- a/src/alloc.c
+++ b/src/alloc.c
@@ -6406,7 +6406,7 @@ mark_object (Lisp_Object arg)
6406 6406
6407#ifdef GC_CHECK_MARKED_OBJECTS 6407#ifdef GC_CHECK_MARKED_OBJECTS
6408 m = mem_find (po); 6408 m = mem_find (po);
6409 if (m == MEM_NIL && !SUBRP (obj) && !THREADP (obj)) 6409 if (m == MEM_NIL && !SUBRP (obj) && !primary_thread_p (po))
6410 emacs_abort (); 6410 emacs_abort ();
6411#endif /* GC_CHECK_MARKED_OBJECTS */ 6411#endif /* GC_CHECK_MARKED_OBJECTS */
6412 6412
@@ -6418,7 +6418,7 @@ mark_object (Lisp_Object arg)
6418 6418
6419 if (pvectype != PVEC_SUBR 6419 if (pvectype != PVEC_SUBR
6420 && pvectype != PVEC_BUFFER 6420 && pvectype != PVEC_BUFFER
6421 && pvectype != PVEC_THREAD) 6421 && !primary_thread_p (po))
6422 CHECK_LIVE (live_vector_p); 6422 CHECK_LIVE (live_vector_p);
6423 6423
6424 switch (pvectype) 6424 switch (pvectype)
diff --git a/src/thread.c b/src/thread.c
index bf2cf1b06c8..6966df31d37 100644
--- a/src/thread.c
+++ b/src/thread.c
@@ -950,6 +950,12 @@ init_primary_thread (void)
950 primary_thread.event_object = Qnil; 950 primary_thread.event_object = Qnil;
951} 951}
952 952
953bool
954primary_thread_p (void *ptr)
955{
956 return (ptr == &primary_thread) ? true : false;
957}
958
953void 959void
954init_threads_once (void) 960init_threads_once (void)
955{ 961{
diff --git a/src/thread.h b/src/thread.h
index 7dee67d6595..0090652b358 100644
--- a/src/thread.h
+++ b/src/thread.h
@@ -236,6 +236,7 @@ extern void maybe_reacquire_global_lock (void);
236extern void init_threads_once (void); 236extern void init_threads_once (void);
237extern void init_threads (void); 237extern void init_threads (void);
238extern void syms_of_threads (void); 238extern void syms_of_threads (void);
239extern bool primary_thread_p (void *);
239 240
240typedef int select_func (int, fd_set *, fd_set *, fd_set *, 241typedef int select_func (int, fd_set *, fd_set *, fd_set *,
241 const struct timespec *, const sigset_t *); 242 const struct timespec *, const sigset_t *);