1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2024-12-14 09:39:42 +00:00
emacs/etc
Eli Zaretskii 2412a1fc05 Support concurrency in Emacs Lisp
Merge branch 'test-concurrency'

* src/thread.c:
* src/thread.h:
* src/systhread.c:
* src/systhread.h: New files.
* src/xgselect.c (xg_select): Avoid using SAFE_NALLOCA and use
xnmalloc unconditionally.
* src/window.c (struct save_window_data): Rename current_buffer to
f_current_buffer.
* src/w32proc.c (sys_select): Change the function signature to
closer fit 'pselect' on Posix hosts.
* src/search.c:
* src/regex.h: Convert some globals to macros that reference
thread-specific values.
* src/process.c (pset_thread, add_non_keyboard_read_fd)
(add_process_read_fd, add_non_blocking_write_fd)
(recompute_input_desc, compute_input_wait_mask)
(compute_non_process_wait_mask, compute_non_keyboard_wait_mask)
(compute_write_mask, clear_waiting_thread_info)
(update_processes_for_thread_death, Fset_process_thread)
(Fprocess_thread): New functions.
(enum fd_bits): New enumeration.
(fd_callback_data): Add 'thread' and 'waiting_thread', rename
'condition' to 'flags'.
(set_process_filter_masks, create_process, create_pty)
(Fmake_serial_process, finish_after_tls_connection)
(connect_network_socket, deactivate_process)
(server_accept_connection, wait_reading_process_output)
(Fcontinue_process, Fstop_process, keyboard_bit_set)
(add_timer_wait_descriptor, add_keyboard_wait_descriptor)
(delete_keyboard_wait_descriptor): Use the new functions instead
of manipulating fd flags and masks directly.
(syms_of_process): Defsubr the new primitives.
* src/print.c (print_object): Print threads, mutexes, and
conditional variables.
* src/lisp.h (enum pvec_type): New values PVEC_THREAD, PVEC_MUTEX,
and PVEC_CONDVAR.
(XTHREAD, XMUTEX, XCONDVAR, THREADP, MUTEXP, CONDVARP)
(CHECK_THREAD, CHECK_MUTEX, CHECK_CONDVAR): New inline functions.
(XSETTHREAD, XSETMUTEX, XSETCONDVAR): New macros.
(struct handler): Add back byte_stack.  Rename lisp_eval_depth to
f_lisp_eval_depth.
* src/eval.c (specpdl_kind, specpdl_arg, do_specbind)
(rebind_for_thread_switch, do_one_unbind)
(unbind_for_thread_switch): New functions.
(init_eval): 'handlerlist' is not malloc'ed.
(specbind): Call do_specbind.
(unbind_to): Call do_one_unbind.
(mark_specpdl): Accept 2 arguments.
(mark_specpdl): Mark the saved value in a let-binding.
* src/emacs.c (main): Call init_threads_once, init_threads, and
syms_of_threads.
* src/data.c (Ftype_of): Support thread, mutex, and condvar
objects.
(Fthreadp, Fmutexp, Fcondition_variable_p): New functions.
(syms_of_data): DEFSYM and defsubr new symbols and primitives.
* src/bytecode.c (struct byte_stack, FETCH, CHECK_RANGE)
(BYTE_CODE_QUIT): Add back.
(exec_byte_code): Add back byte stack manipulation.
* src/alloc.c (cleanup_vector): Handle threads, mutexes, and
conditional variables.
(mark_stack): Now extern; accept additional argument 'bottom'.
(flush_stack_call_func): New function.
(garbage_collect_1): Call mark_threads and unmark_threads.  Don't
mark handlers.
* src/.gdbinit (xbytecode): Add back.

* test/src/thread-tests.el: New tests.
* test/src/data-tests.el (binding-test-manual)
(binding-test-setq-default, binding-test-makunbound)
(binding-test-defvar-bool, binding-test-defvar-int)
(binding-test-set-constant-t, binding-test-set-constant-nil)
(binding-test-set-constant-keyword)
(binding-test-set-constant-nil): New tests.

* doc/lispref/processes.texi (Processes and Threads): New
subsection.
* doc/lispref/threads.texi: New file
* doc/lispref/elisp.texi (Top): Include it.
* doc/lispref/objects.texi (Thread Type, Mutex Type)
(Condition Variable Type): New subsections.
(Type Predicates): Add thread-related predicates.
* doc/lispref/objects.texi (Editing Types):
* doc/lispref/elisp.texi (Top): Update higher-level menus.

* etc/NEWS: Mention concurrency features.
2016-12-10 18:54:43 +02:00
..
charsets Update copyright year to 2016 2016-01-01 01:34:24 -08:00
e Prefer straight quoting in some etc text files 2015-08-26 14:09:07 -07:00
forms Update copyright year to 2016 2016-01-01 01:34:24 -08:00
gnus
images Fix copyright years by hand 2016-01-01 01:38:07 -08:00
nxml Update nXML to use Emacs's Unicode support, and lexical-binding 2016-01-15 10:29:20 -05:00
org Update copyright year to 2016 2016-01-01 01:34:24 -08:00
refcards Merge from origin/emacs-25 2016-12-07 12:39:08 -08:00
schema Update copyright year to 2016 2016-01-01 01:34:24 -08:00
srecode Update copyright year to 2016 2016-01-01 01:34:24 -08:00
themes Fix bug#25087 2016-12-02 14:08:59 +01:00
tutorials Improve the tutorial 2016-11-07 19:55:25 +02:00
AUTHORS * etc/AUTHORS: Regenerate the AUTHORS file 2016-11-21 17:51:32 +01:00
CALC-NEWS Update copyright year to 2016 2016-01-01 01:34:24 -08:00
CENSORSHIP Make some files in etc obsolete 2014-03-22 16:47:20 -07:00
ChangeLog.1 Spelling and grammar fixes 2016-01-01 01:59:19 -08:00
compilation.txt ; Spelling and quoting fixes 2016-05-01 18:53:31 -07:00
COPYING
DEBUG Merge branch 'concurrency' 2016-12-04 19:59:17 +02:00
DEVEL.HUMOR Prefer straight quoting in some etc text files 2015-08-26 14:09:07 -07:00
DISTRIB Modernize usage of 'macOS' in doc and comments 2016-11-06 00:42:03 -07:00
edt-user.el Kevin Gallagher has new email address 2016-02-10 20:40:28 +02:00
emacs-buffer.gdb Merge from origin/emacs-25 2016-10-23 02:43:16 -07:00
emacs.appdata.xml Update copyright year to 2016 2016-01-01 01:34:24 -08:00
emacs.desktop * etc/emacs.desktop: Add "Keywords". 2014-10-30 21:10:19 -07:00
emacs.icon
emacs.service Add --new-daemon, which runs in the foreground and does not fork 2016-11-15 23:28:47 -08:00
enriched.txt Update copyright year to 2016 2016-01-01 01:34:24 -08:00
ERC-NEWS ; Spelling fixes 2016-11-04 14:50:59 -07:00
ETAGS.EBNF Update copyright year to 2016 2016-01-01 01:34:24 -08:00
ETAGS.README Update copyright year to 2016 2016-01-01 01:34:24 -08:00
FTP Make etc/FTP and etc/ORDERS obsolete 2014-01-09 21:44:51 -05:00
future-bug
GNU Update copyright year to 2015 2015-01-01 09:18:06 -08:00
GNUS-NEWS Add a variable to pass additional options to rcvstore 2016-11-21 06:10:13 +00:00
gnus-tut.txt Update copyright year to 2016 2016-01-01 01:34:24 -08:00
grep.txt Update copyright year to 2016 2016-01-01 01:34:24 -08:00
HELLO * etc/HELLO: Add Armenian and Mongolian greetings. 2016-01-11 20:12:12 +02:00
HISTORY ; Update ChangeLog.2 and ldef-boot.el for Emacs 25.1 release 2016-09-15 23:30:09 +02:00
JOKES
LINUX-GNU Make some files in etc obsolete 2014-03-22 16:47:20 -07:00
MACHINES Clean out some IRIX cruft 2016-12-06 23:43:24 -08:00
MH-E-NEWS Update copyright year to 2016 2016-01-01 01:34:24 -08:00
MORE.STUFF * etc/MORE.STUFF: Replace contents with pointer to efaq.info. 2014-01-09 14:14:28 -05:00
NEWS Support concurrency in Emacs Lisp 2016-12-10 18:54:43 +02:00
NEWS.1-17 Update copyright year to 2016 2016-01-01 01:34:24 -08:00
NEWS.18 Update copyright year to 2016 2016-01-01 01:34:24 -08:00
NEWS.19 Update copyright year to 2016 2016-01-01 01:34:24 -08:00
NEWS.20 Update copyright year to 2016 2016-01-01 01:34:24 -08:00
NEWS.21 Update copyright year to 2016 2016-01-01 01:34:24 -08:00
NEWS.22 Modernize usage of 'macOS' in doc and comments 2016-11-06 00:42:03 -07:00
NEWS.23 ; Spelling fixes 2016-11-04 14:50:59 -07:00
NEWS.24 Modernize usage of 'macOS' in doc and comments 2016-11-06 00:42:03 -07:00
NEWS.25 Merge from origin/emacs-25 2016-11-19 14:31:05 -08:00
NEXTSTEP Modernize usage of 'macOS' in doc and comments 2016-11-06 00:42:03 -07:00
NXML-NEWS Update copyright year to 2016 2016-01-01 01:34:24 -08:00
ORDERS Make etc/FTP and etc/ORDERS obsolete 2014-01-09 21:44:51 -05:00
ORG-NEWS Modernize usage of 'macOS' in doc and comments 2016-11-06 00:42:03 -07:00
package-keyring.gpg * etc/package-keyring.gpg: New file. 2014-09-24 10:28:27 -04:00
PROBLEMS ; Spelling fixes 2016-11-19 14:58:05 -08:00
ps-prin0.ps Update copyright year to 2016 2016-01-01 01:34:24 -08:00
ps-prin1.ps Update copyright year to 2016 2016-01-01 01:34:24 -08:00
publicsuffix.txt Update publicsuffix.txt. 2016-02-06 16:11:18 +11:00
README Update copyright year to 2016 2016-01-01 01:34:24 -08:00
rgb.txt
ses-example.ses Update copyright year to 2016 2016-01-01 01:34:24 -08:00
spook.lines
TERMS Update copyright year to 2016 2016-01-01 01:34:24 -08:00
THE-GNU-PROJECT Make some files in etc obsolete 2014-03-22 16:47:20 -07:00
TODO Modernize usage of 'macOS' in doc and comments 2016-11-06 00:42:03 -07:00
WHY-FREE Make some files in etc obsolete 2014-03-22 16:47:20 -07:00
yow.lines Prefer straight quoting in some etc text files 2015-08-26 14:09:07 -07:00

This directory contains the architecture-independent files used by or
with Emacs.  This includes some text files of documentation for GNU
Emacs or of interest to Emacs users, and the file of dumped docstrings
for Emacs functions and variables.

COPYRIGHT AND LICENSE INFORMATION FOR IMAGE FILES

File: emacs.icon
  Author: Sun Microsystems, Inc
  Copyright (C) 1999, 2001-2016 Free Software Foundation, Inc.
  License: GNU General Public License version 3 or later (see COPYING)