#ifdef GC_CHECK_MARKED_OBJECTS
m = mem_find (po);
- if (m == MEM_NIL && !SUBRP (obj) && !primary_thread_p (po))
+ if (m == MEM_NIL && !SUBRP (obj) && !main_thread_p (po))
emacs_abort ();
#endif /* GC_CHECK_MARKED_OBJECTS */
if (pvectype != PVEC_SUBR
&& pvectype != PVEC_BUFFER
- && !primary_thread_p (po))
+ && !main_thread_p (po))
CHECK_LIVE (live_vector_p);
switch (pvectype)
#include "coding.h"
#include "syssignal.h"
-static struct thread_state primary_thread;
+static struct thread_state main_thread;
-struct thread_state *current_thread = &primary_thread;
+struct thread_state *current_thread = &main_thread;
-static struct thread_state *all_threads = &primary_thread;
+static struct thread_state *all_threads = &main_thread;
static sys_mutex_t global_lock;
\f
static void
-init_primary_thread (void)
+init_main_thread (void)
{
- primary_thread.header.size
+ main_thread.header.size
= PSEUDOVECSIZE (struct thread_state, m_stack_bottom);
- XSETPVECTYPE (&primary_thread, PVEC_THREAD);
- primary_thread.m_last_thing_searched = Qnil;
- primary_thread.m_saved_last_thing_searched = Qnil;
- primary_thread.name = Qnil;
- primary_thread.function = Qnil;
- primary_thread.error_symbol = Qnil;
- primary_thread.error_data = Qnil;
- primary_thread.event_object = Qnil;
+ XSETPVECTYPE (&main_thread, PVEC_THREAD);
+ main_thread.m_last_thing_searched = Qnil;
+ main_thread.m_saved_last_thing_searched = Qnil;
+ main_thread.name = Qnil;
+ main_thread.function = Qnil;
+ main_thread.error_symbol = Qnil;
+ main_thread.error_data = Qnil;
+ main_thread.event_object = Qnil;
}
bool
-primary_thread_p (void *ptr)
+main_thread_p (void *ptr)
{
- return (ptr == &primary_thread) ? true : false;
+ return ptr == &main_thread;
}
void
init_threads_once (void)
{
- init_primary_thread ();
+ init_main_thread ();
}
void
init_threads (void)
{
- init_primary_thread ();
- sys_cond_init (&primary_thread.thread_condvar);
+ init_main_thread ();
+ sys_cond_init (&main_thread.thread_condvar);
sys_mutex_init (&global_lock);
sys_mutex_lock (&global_lock);
- current_thread = &primary_thread;
- primary_thread.thread_id = sys_thread_self ();
+ current_thread = &main_thread;
+ main_thread.thread_id = sys_thread_self ();
}
void
extern void init_threads_once (void);
extern void init_threads (void);
extern void syms_of_threads (void);
-extern bool primary_thread_p (void *);
+extern bool main_thread_p (void *);
typedef int select_func (int, fd_set *, fd_set *, fd_set *,
const struct timespec *, const sigset_t *);
terminate it by sys_kill. */
HWND hwnd;
/* Information about subprocess returned by CreateProcess. Includes
- handles to the subprocess and its primary thread, and the
+ handles to the subprocess and its main thread, and the
corresponding process ID and thread ID numbers. The PID is
mirrored by the 'pid' member above. The process handle is used
to wait on it. */