aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* another docstring fixletTom Tromey2012-08-191-1/+2
|
* minor docstring fixupTom Tromey2012-08-191-4/+4
|
* add condition-mutex and condition-nameTom Tromey2012-08-192-0/+45
|
* ensure name of a thread is a stringTom Tromey2012-08-191-0/+3
|
* ensure name of a mutex is a stringTom Tromey2012-08-191-0/+3
|
* use NILPTom Tromey2012-08-191-3/+3
|
* condition variablesTom Tromey2012-08-197-20/+268
| | | | | This implements condition variables for elisp. This needs more tests.
* comment fixesTom Tromey2012-08-181-1/+7
|
* refactor systhread.hTom Tromey2012-08-184-128/+121
| | | | | | This refactors systhread.h to move the notion of a "lisp mutex" into thread.c. This lets us make make the global lock and post_acquire_global_lock static.
* write docstrings for the thread functionsTom Tromey2012-08-171-26/+54
|
* declare unbind_for_thread_switch and rebind_for_thread_switch in lisp.hTom Tromey2012-08-172-4/+2
|
* add test case for I/O switchingTom Tromey2012-08-151-0/+13
|
* process changesTom Tromey2012-08-154-28/+221
| | | | | | | | | | | | | | | This changes wait_reading_process_output to handle threads better. It introduces a wrapper for select that releases the global lock, and it ensures that only a single thread can select a given file descriptor at a time. This also adds the thread-locking feature to processes. By default a process can only have its output accepted by the thread that created it. This can be changed using set-process-thread. (If the thread exits, the process is again available for waiting by any thread.) Note that thread-signal will not currently interrupt a thread blocked on select. I'll fix this later.
* Prepare process.c for threads by not having global select masks.Tom Tromey2012-08-151-130/+165
| | | | The next step is to make it so selects can choose fds by thread.
* fix a latent bug in process.cTom Tromey2012-08-151-1/+1
| | | | | * process.c (wait_reading_process_output): Check Writeok bits, not write_mask.
* This adds thread-blocker, a function to examine what a thread isTom Tromey2012-08-152-1/+34
| | | | blocked on. I thought this would be another nice debugging addition.
* This adds names to mutexes. This seemed like a nice debuggingTom Tromey2012-08-153-13/+31
| | | | extension.
* This adds some tests of the threading code.Tom Tromey2012-08-151-0/+165
|
* This supplies the mutex implementation for Emacs Lisp.Tom Tromey2012-08-156-3/+117
| | | | | | | A lisp mutex is implemented using a condition variable, so that we can interrupt a mutex-lock operation by calling thread-signal on the blocking thread. I did things this way because pthread_mutex_lock can't readily be interrupted.
* This adds most of the thread features visible to emacs lisp.Tom Tromey2012-08-157-19/+400
| | | | | | | | | | | | | | | | | | I roughly followed the Bordeaux threads API: http://trac.common-lisp.net/bordeaux-threads/wiki/ApiDocumentation ... but not identically. In particular I chose not to implement interrupt-thread or destroy-thread, but instead a thread-signalling approach. I'm still undecided about *default-special-bindings* (which I did not implement). I think it would be more emacs-like to capture the let bindings at make-thread time, but IIRC Stefan didn't like this idea the first time around. There are one or two semantics issues pointed out in the patch where I could use some advice.
* This turns thread_state into a pseudovector and updates various bitsTom Tromey2012-08-155-3/+38
| | | | of Emacs to cope.
* This introduces some new functions to handle the specpdl. The basicTom Tromey2012-08-154-42/+134
| | | | | | | | | | | | | | idea is that when a thread loses the interpreter lock, it will unbind the bindings it has put in place. Then when a thread acquires the lock, it will restore its bindings. This code reuses an existing empty slot in struct specbinding to store the current value when the thread is "swapped out". This approach performs worse than my previously planned approach. However, it was one I could implement with minimal time and brainpower. I hope that perhaps someone else could improve the code once it is in.
* This introduces the low-level system threading support. It also addsTom Tromey2012-08-157-1/+286
| | | | | | | | | | | | | | | | | | | the global lock. The low-level support is a bit over-eager, in that even at the end of the present series, it will not all be used. I think thiat is ok since I plan to use it all eventually -- in particular for the emacs lisp mutex implementation. I've only implemented the pthreads-based version. I think it should be relatively clear how to port this to other systems, though. I'd also like to do a "no threads" port that will turn most things into no-ops, and have thread-creation fail. I was thinking perhaps I'd make a future (provide 'threads) conditional on threads actually working. One other minor enhancement available here is to make it possible to set the name of the new thread at the OS layer. That way gdb, e.g., could display thread names.
* This parameterizes the GC a bit to make it thread-ready.Tom Tromey2012-08-156-64/+140
| | | | | | | | | | | | | 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.
* This introduces a thread-state object and moves various C globalsTom Tromey2012-08-1514-101/+223
| | | | | | | | | | | there. It also introduces #defines for these globals to avoid a monster patch. The #defines mean that this patch also has to rename a few fields whose names clash with the defines. There is currently just a single "thread"; so this patch does not impact Emacs behavior in any significant way.
* Reword previous NEWS change.Glenn Morris2012-08-151-1/+1
|
* Replace version 24.2 with 24.3 where appropriate (hopefully)Glenn Morris2012-08-1581-182/+186
|
* Fix bug #12196 with incorrect memory allocations for region-cache.Eli Zaretskii2012-08-152-3/+9
| | | | | src/region-cache.c (move_cache_gap): Update gap_len using the actual growth of the boundaries array. Do not change cache_len.
* Generalize and cleanup font subsystem checks.Dmitry Antipov2012-08-157-45/+36
| | | | | | * font.h (FONT_DEBUG, font_assert): Remove. * font.c, fontset.c, w32font.c, xfont.c, xftfont.c: Change font_assert to eassert. Use eassert where appropriate.
* Bump version to 24.2.50Chong Yidong2012-08-1513-22/+22
|
* Fix last change to xg_get_font.Dmitry Antipov2012-08-152-3/+7
| | | | * gtkutil.c (xg_get_font): Use pango_units_to_double.
* * etags.c (Pascal_functions): Fix parenthesization typo.Paul Eggert2012-08-152-1/+5
|
* Extract better font information from the GTK >= 3.2 font chooser.Chong Yidong2012-08-158-56/+145
| | | | | | | | | | | | | | | * gtkutil.c (xg_get_font): Rename from xg_get_font_name. When using the new font chooser, use gtk_font_chooser_get_font_desc to extract the font descriptor instead of just the font name. In that case, return a font spec instead of a string. (x_last_font_name): Move to this file from xfns.c. * xfns.c (Fx_select_font): The return value can also be a font spec. Move x_last_font_name management to gtkutil.c. * xfaces.c: Make font weight and style symbols non-static. * lisp/frame.el (set-frame-font): Accept font objects.
* More CPP-DEFINES updatesGlenn Morris2012-08-151-10/+272
|
* * src/minibuf.c (read_minibuf): Ignore caller's inhibit-read-only.Stefan Monnier2012-08-152-0/+6
| | | | Fixes: debbugs:12117
* * lisp/textmodes/tex-mode.el (tex-insert-quote): ~ is a space.Stefan Monnier2012-08-142-1/+6
| | | | Fixes: debbugs:12137
* * lisp/man.el (Man-overstrike-face, Man-underline-face)Wolfgang Jenkner2012-08-142-50/+42
| | | | | | | | | | | | (Man-reverse-face): Remove variables. (Man-overstrike, Man-underline, Man-reverse): New faces. (Man-fontify-manpage): Use them instead of the variables. (Man-cleanup-manpage): Comment change. (Man-ansi-color-map): New variable. (Man-fontify-manpage): Use it. Call ansi-color-apply-on-region to replace ad hoc code. Fixes: debbugs:12147
* Implement ANSI SGR parameters 22-27.Wolfgang Jenkner2012-08-142-78/+111
| | | | | | | | | | | | | | | | * lisp/ansi-color.el (ansi-colors): Doc fix. (ansi-color-context, ansi-color-context-region): Doc fix. (ansi-color--find-face): New function. (ansi-color-apply, ansi-color-apply-on-region): Use it. Rename the local variable `face' to `codes' since it is now a list of ansi codes. Doc fix. (ansi-color-get-face): Remove. (ansi-color-parse-sequence): New function, derived from ansi-color-get-face. (ansi-color-apply-sequence): Use it. Rewrite, and support ansi codes 22-27. Fixes: debbugs:12146
* * lisp/subr.el (read-passwd): Allow use from a minibuffer.Stefan Monnier2012-08-142-3/+8
|
* * src/alloc.c (Fgarbage_collect): Use plural form consistently.Stefan Monnier2012-08-142-39/+62
|
* Fix compiler warning in keyboard.c.Eli Zaretskii2012-08-141-0/+2
|
* Fix last change in keyboard.c.Eli Zaretskii2012-08-141-0/+3
|
* Fix and improve GUD Tooltip mode.Eli Zaretskii2012-08-146-36/+86
| | | | | | | | | | | | | | | | | | | | | | | | lisp/tooltip.el (tooltip-identifier-from-point): Don't treat tokens inside comments and strings as identifiers. lisp/progmodes/gud.el (gud-tooltip-print-command): Quote the expression to evaluate. This allows to evaluate expressions with embedded whitespace. (gud-tooltip-tips): Add a blank before the newline in the message-box text, for the benefit of message-box emulation on MS-Windows. lisp/progmodes/gdb-mi.el (gdb-tooltip-print): Don't ignore error messages from GDB, pop them up in a tooltip to give feedback to user. (gdb-tooltip-print-1): Quote the expression to evaluate. This allows to evaluate expressions with embedded whitespace. (gdb-inferior-io--init-proc): Don't send "-inferior-tty" command if the TTY name is nil or empty (which happens when communicating with the inferior via pipes, e.g. on MS-Windows). (gdb-internals): If GDB sends a "&\n" empty debugging message, don't send that to the GUD buffer. doc/emacs/building.texi (Debugger Operation): Correct and improve documentation of the GUD Tooltip mode.
* Fix a problem with disabled mouse movement events.Eli Zaretskii2012-08-142-0/+12
| | | | | | src/keyboard.c (command_loop_1): Reset ignore_mouse_drag_p flag each iteration through the command loop. Fixes a problem whereby mouse movements are ignored until the first mouse click.
* byte-compile-setq-default fix for bug#12195Glenn Morris2012-08-142-14/+21
| | | | | * lisp/emacs-lisp/bytecomp.el (byte-compile-setq-default): Optimize away setq-default with no args, as is done for setq.
* Use bool for Emacs Lisp booleans.Paul Eggert2012-08-148-18/+39
| | | | | | | | | | | | | | | | | This is more natural, and on my platform (GCC 4.7.1 x86-64) it makes Emacs's text size .03% smaller and presumably a bit faster. * admin/merge-gnulib (GNULIB_MODULES): Add stdbool. This documents a new direct dependency; stdbool was already being used indirectly via other gnulib modules. * lib-src/make-docfile.c (enum global_type): Sort values roughly in decreasing alignment, except put functions last. (compare_globals): Use this new property of enum global_type. (write_globals): Use bool, not int, for booleans. * src/lisp.h: Include <stdbool.h>. (struct Lisp_Boolfwd, defvar_bool): * src/lread.c (defvar_bool): Use bool, not int, for Lisp booleans. * src/regex.c [!emacs]: Include <stdbool.h>. (false, true): Remove; <stdbool.h> does this for us now.
* More doc fixes.Chong Yidong2012-08-156-18/+40
| | | | | | | | | | | | * lisp/minibuffer.el (read-file-name): Doc fix. * character.c (Fcharacterp): Doc fix (Bug#12076). * data.c (Findirect_variable): Doc fix (Bug#11040). * editfns.c (Fsave_current_buffer): Doc fix (Bug#11542). Fixes: debbugs:11542 debbugs:11040 debbugs:12076 debbugs:10881
* Doc fixes.Chong Yidong2012-08-155-8/+24
| | | | | | | | | | * lisp/emacs-lisp/regexp-opt.el (regexp-opt-charset): Doc fix. * src/chartab.c (Fmap_char_table): Doc fix. * src/editfns.c (Fformat): Doc fix. Fixes: debbugs:12059 debbugs:12085 debbugs:12061
* nt/config.nt: Sync with autogen/config.in.Juanma Barranquero2012-08-142-2/+8
| | | | (_GL_INLINE_HEADER_BEGIN): Update.
* * lisp/emacs-lisp/bytecomp.el (byte-recompile-file): Doc fix.Glenn Morris2012-08-142-14/+16
|