eval.o floatfns.o fns.o font.o print.o lread.o \
syntax.o $(UNEXEC_OBJ) bytecode.o \
process.o gnutls.o callproc.o \
- region-cache.o sound.o atimer.o \
+ region-cache.o sound.o atimer.o thread.o systhread.o \
doprnt.o intervals.o textprop.o composite.o xml.o \
- $(MSDOS_OBJ) $(MSDOS_X_OBJ) $(NS_OBJ) $(CYGWIN_OBJ) $(FONT_OBJ)
+ $(MSDOS_OBJ) $(MSDOS_X_OBJ) $(NS_OBJ) $(CYGWIN_OBJ) $(FONT_OBJ) \
+ $(WINDOW_SYSTEM_OBJ)
obj = $(base_obj) $(NS_OBJC_OBJ)
## Object files used on some machine or other.
static struct Lisp_Vector *allocate_vectorlike (ptrdiff_t);
static void lisp_free (void *);
- static int live_vector_p (struct mem_node *, void *);
- static int live_buffer_p (struct mem_node *, void *);
- static int live_string_p (struct mem_node *, void *);
- static int live_cons_p (struct mem_node *, void *);
- static int live_symbol_p (struct mem_node *, void *);
- static int live_float_p (struct mem_node *, void *);
- static int live_misc_p (struct mem_node *, void *);
-static void mark_stack (void);
+ static bool live_vector_p (struct mem_node *, void *);
+ static bool live_buffer_p (struct mem_node *, void *);
+ static bool live_string_p (struct mem_node *, void *);
+ static bool live_cons_p (struct mem_node *, void *);
+ static bool live_symbol_p (struct mem_node *, void *);
+ static bool live_float_p (struct mem_node *, void *);
+ static bool live_misc_p (struct mem_node *, void *);
static void mark_maybe_object (Lisp_Object);
static void mark_memory (void *, void *);
#if GC_MARK_STACK || defined GC_MALLOC_CHECK
Lisp_Object o;
jmp_buf j;
} j;
- volatile int stack_grows_down_p = (char *) &j > (char *) stack_bottom;
- volatile bool stack_grows_down_p = (char *) &j > (char *) stack_base;
++ volatile bool stack_grows_down_p = (char *) &j > (char *) stack_bottom;
#endif
/* This trick flushes the register windows so that all the state of
the process is contained in the stack. */
for (i = 0; i < staticidx; i++)
mark_object (*staticvec[i]);
- for (bind = specpdl; bind != specpdl_ptr; bind++)
- {
- mark_object (bind->symbol);
- mark_object (bind->old_value);
- }
+ mark_threads ();
mark_terminals ();
mark_kboards ();
- mark_ttys ();
#ifdef USE_GTK
- {
- extern void xg_mark_data (void);
- xg_mark_data ();
- }
+ xg_mark_data ();
#endif
-#if (GC_MARK_STACK == GC_MAKE_GCPROS_NOOPS \
- || GC_MARK_STACK == GC_MARK_STACK_CHECK_GCPROS)
- mark_stack ();
-#else
- {
- register struct gcpro *tail;
- for (tail = gcprolist; tail; tail = tail->next)
- for (i = 0; i < tail->nvars; i++)
- mark_object (tail->var[i]);
- }
- mark_byte_stack ();
- {
- struct catchtag *catch;
- struct handler *handler;
-
- for (catch = catchlist; catch; catch = catch->next)
- {
- mark_object (catch->tag);
- mark_object (catch->val);
- }
- for (handler = handlerlist; handler; handler = handler->next)
- {
- mark_object (handler->handler);
- mark_object (handler->var);
- }
- }
- mark_backtrace ();
-#endif
-
#ifdef HAVE_WINDOW_SYSTEM
mark_fringe_data ();
#endif
DEFSYM (Qchar_table, "char-table");
DEFSYM (Qbool_vector, "bool-vector");
DEFSYM (Qhash_table, "hash-table");
- /* Used by Fgarbage_collect. */
- DEFSYM (Qinterval, "interval");
+ DEFSYM (Qthread, "thread");
+ DEFSYM (Qmutex, "mutex");
+ DEFSYM (Qcondition_variable, "condition-variable");
DEFSYM (Qmisc, "misc");
DEFSYM (Qdefun, "defun");
Lisp_Object Qkill_emacs;
- /* If non-zero, Emacs should not attempt to use a window-specific code,
+ /* If true, Emacs should not attempt to use a window-specific code,
but instead should use the virtual terminal under which it was started. */
- int inhibit_window_system;
+ bool inhibit_window_system;
- /* If non-zero, a filter or a sentinel is running. Tested to save the match
+ /* If true, a filter or a sentinel is running. Tested to save the match
data on the first attempt to change it inside asynchronous code. */
- int running_asynch_code;
+ bool running_asynch_code;
#if defined (HAVE_X_WINDOWS) || defined (HAVE_NS)
- /* If non-zero, -d was specified, meaning we're using some window system. */
- int display_arg;
+ /* If true, -d was specified, meaning we're using some window system. */
+ bool display_arg;
#endif
-/* An address near the bottom of the stack.
- Tells GC how to save a copy of the stack. */
-char *stack_bottom;
-
#if defined (DOUG_LEA_MALLOC) || defined (GNU_LINUX)
/* The address where the heap starts (from the first sbrk (0) call). */
static void *my_heap_start;
int
main (int argc, char **argv)
{
-#if GC_MARK_STACK
- Lisp_Object dummy;
-#endif
char stack_bottom_variable;
- int do_initial_setlocale;
+ bool do_initial_setlocale;
int skip_args = 0;
#ifdef HAVE_SETRLIMIT
struct rlimit rlim;
for (channel = 0; channel <= max_input_desc; ++channel)
{
struct fd_callback_data *d = &fd_callback_info[channel];
- if (FD_ISSET (channel, &Available)
- && d->func != 0
- && (d->flags & FOR_READ) != 0)
- d->func (channel, d->data, 1);
- if (FD_ISSET (channel, &Writeok)
- && d->func != 0
- && (d->flags & FOR_WRITE) != 0)
- d->func (channel, d->data, 0);
- }
+ if (d->func
- && ((d->condition & FOR_READ
++ && ((d->flags & FOR_READ
+ && FD_ISSET (channel, &Available))
- || (d->condition & FOR_WRITE
- && FD_ISSET (channel, &write_mask))))
++ || (d->flags & FOR_WRITE
++ && FD_ISSET (channel, &Writeok))))
+ d->func (channel, d->data);
+ }
for (channel = 0; channel <= max_process_desc; channel++)
{