From: Tom Tromey Date: Tue, 4 Sep 2012 16:10:06 +0000 (-0600) Subject: merge from trunk X-Git-Tag: emacs-26.0.90~1144^2~17^2~52 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=bf69f522a9e135f9aa483cedd53e71e915f2bf75;p=emacs.git merge from trunk --- bf69f522a9e135f9aa483cedd53e71e915f2bf75 diff --cc src/Makefile.in index 01034ca98d5,fe4cff5d8cc..24c8b94b590 --- a/src/Makefile.in +++ b/src/Makefile.in @@@ -336,9 -340,10 +340,10 @@@ base_obj = dispnew.o frame.o scroll.o x 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. diff --cc src/alloc.c index a8830684580,edecd51f1ac..859961781e0 --- a/src/alloc.c +++ b/src/alloc.c @@@ -387,13 -396,14 +392,13 @@@ static struct mem_node mem_z 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 @@@ -4908,7 -4897,7 +4914,7 @@@ flush_stack_call_func (void (*func) (vo 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. */ @@@ -5470,18 -5472,47 +5477,14 @@@ See Info node `(elisp)Garbage Collectio 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 diff --cc src/data.c index ac6c7af9d3c,d8b7f42ea3f..a93cd169bf5 --- a/src/data.c +++ b/src/data.c @@@ -3127,11 -3089,6 +3126,9 @@@ syms_of_data (void DEFSYM (Qchar_table, "char-table"); DEFSYM (Qbool_vector, "bool-vector"); DEFSYM (Qhash_table, "hash-table"); + DEFSYM (Qthread, "thread"); + DEFSYM (Qmutex, "mutex"); + DEFSYM (Qcondition_variable, "condition-variable"); - /* Used by Fgarbage_collect. */ - DEFSYM (Qinterval, "interval"); DEFSYM (Qmisc, "misc"); DEFSYM (Qdefun, "defun"); diff --cc src/emacs.c index a039e89d48f,dac5edd544f..3c814a36043 --- a/src/emacs.c +++ b/src/emacs.c @@@ -127,19 -123,23 +123,19 @@@ Lisp_Object Qrisky_local_variable 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; @@@ -679,8 -671,11 +667,8 @@@ void (*__malloc_initialize_hook) (void 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; diff --cc src/process.c index fa138027ec1,2d144b410ed..dbbb23b8627 --- a/src/process.c +++ b/src/process.c @@@ -5039,15 -4861,13 +5030,13 @@@ wait_reading_process_output (intmax_t t 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++) {