1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2025-12-25 23:10:47 -08:00
emacs/test/src
Stefan Monnier b8460fcb8c Rewrite thread context switch code (bug#48990)
Make the context switch code handle buffer-local variables more
correctly by reusing the code originally written for `backtrace-eval`.
This has the side benefit of making the `saved_value` field unused.

* src/lisp.h (enum specbind_tag): Remove `saved_value` field.
(rebind_for_thread_switch, unbind_for_thread_switch): Delete decls.
(specpdl_unrewind): Declare function.

* src/eval.c (specpdl_saved_value): Delete function.
(specbind): Delete the code related to `saved_value`, and consolidate
common code between the different branches.
(rebind_for_thread_switch, -unbind_for_thread_switch): Move to `thread.c`.
(specpdl_unrewind): New function, extracted from `backtrace_eval_unrewind`.
Use `SET_INTERNAL_THREAD_SWITCH`.  Skip the buffer & excursion unwinds
depending on new arg `vars_only`.
(backtrace_eval_unrewind): Use it.
(mark_specpdl): Don't mark `saved_value`.

* src/thread.c (rebind_for_thread_switch, unbind_for_thread_switch):
Move from `eval.c` and rewrite using `specpdl_unrewind`.

* test/src/thread-tests.el (threads-test-bug48990): New test.

* test/Makefile.in (test_template): Add a + as suggested by make:
"warning: jobserver unavailable: using -j1.  Add '+' to parent make rule".
2022-02-12 15:25:53 -05:00
..
comp-resources Silence byte-compiler slightly in tests 2022-01-27 04:25:08 +01:00
emacs-module-resources ; Add 2022 to copyright years. 2022-01-01 02:45:51 -05:00
lread-resources Move some test data to follow our conventions 2020-10-23 16:29:46 +02:00
regex-resources ; Fix more typos 2020-10-03 12:53:51 +02:00
syntax-resources Enhance syntax-tests.el to test nestable comments (Lisp style) 2020-11-17 16:51:49 +00:00
alloc-tests.el Merge from origin/emacs-28 2022-01-01 07:03:03 -05:00
buffer-tests.el Silence byte-compiler in two tests 2022-02-04 14:18:35 +01:00
callint-tests.el ; Add 2022 to copyright years. 2022-01-01 02:45:51 -05:00
callproc-tests.el ; Add 2022 to copyright years. 2022-01-01 02:45:51 -05:00
casefiddle-tests.el Merge from origin/emacs-28 2022-01-01 07:03:03 -05:00
character-tests.el ; Add 2022 to copyright years. 2022-01-01 02:45:51 -05:00
charset-tests.el ; Add 2022 to copyright years. 2022-01-01 02:45:51 -05:00
chartab-tests.el ; Add 2022 to copyright years. 2022-01-01 02:45:51 -05:00
cmds-tests.el ; Add 2022 to copyright years. 2022-01-01 02:45:51 -05:00
coding-tests.el ; Add 2022 to copyright years. 2022-01-01 02:45:51 -05:00
comp-tests.el Merge from origin/emacs-28 2022-02-10 06:56:22 +01:00
data-tests.el Merge from origin/emacs-28 2022-01-01 07:03:03 -05:00
decompress-tests.el Merge from origin/emacs-28 2022-01-01 07:03:03 -05:00
doc-tests.el * test/src/doc-tests.el: New file. 2022-01-04 05:38:00 +01:00
editfns-tests.el Merge from origin/emacs-28 2022-01-01 07:03:03 -05:00
emacs-module-tests.el Merge from origin/emacs-28 2022-01-01 07:03:03 -05:00
emacs-tests.el Merge from origin/emacs-28 2022-01-01 07:03:03 -05:00
eval-tests.el Merge from origin/emacs-28 2022-01-01 07:03:03 -05:00
fileio-tests.el ; Add 2022 to copyright years. 2022-01-01 02:45:51 -05:00
filelock-tests.el Extend filelock-tests.el for bug#53207 2022-01-31 15:26:06 +01:00
floatfns-tests.el Merge from origin/emacs-28 2022-01-01 07:03:03 -05:00
fns-tests.el Add tests for concat, vconcat and append 2022-01-26 17:10:16 +01:00
font-tests.el ; Add 2022 to copyright years. 2022-01-01 02:45:51 -05:00
image-tests.el ; Add 2022 to copyright years. 2022-01-01 07:07:15 -05:00
indent-tests.el ; Add 2022 to copyright years. 2022-01-01 02:45:51 -05:00
inotify-tests.el Merge from origin/emacs-28 2022-01-01 07:03:03 -05:00
json-tests.el ; Add 2022 to copyright years. 2022-01-01 02:45:51 -05:00
keyboard-tests.el ; Add 2022 to copyright years. 2022-01-01 02:45:51 -05:00
keymap-tests.el Merge from origin/emacs-28 2022-01-01 07:03:03 -05:00
lcms-tests.el Merge from origin/emacs-28 2022-01-01 07:03:03 -05:00
lread-tests.el Merge from origin/emacs-28 2022-01-01 07:03:03 -05:00
marker-tests.el ; Add 2022 to copyright years. 2022-01-01 02:45:51 -05:00
minibuf-tests.el ; Add 2022 to copyright years. 2022-01-01 02:45:51 -05:00
print-tests.el Add new variable print-unreadable-function 2022-01-22 15:13:27 +01:00
process-tests.el Merge from origin/emacs-28 2022-01-01 07:03:03 -05:00
regex-emacs-tests.el ; Add 2022 to copyright years. 2022-01-01 02:45:51 -05:00
search-tests.el Merge from origin/emacs-28 2022-01-01 07:03:03 -05:00
sqlite-tests.el ; Add 2022 to copyright years. 2022-01-01 07:07:15 -05:00
syntax-tests.el Fix Fchar_syntax for non-ASCII in unibyte buffers 2022-01-20 11:44:07 +01:00
textprop-tests.el ; Add 2022 to copyright years. 2022-01-01 02:45:51 -05:00
thread-tests.el Rewrite thread context switch code (bug#48990) 2022-02-12 15:25:53 -05:00
timefns-tests.el Merge from origin/emacs-28 2022-01-01 07:03:03 -05:00
undo-tests.el Merge from origin/emacs-28 2022-01-01 07:03:03 -05:00
xdisp-tests.el Allow redirecting `message' output to a different buffer 2022-01-29 17:24:49 +01:00
xfaces-tests.el ; Add 2022 to copyright years. 2022-01-01 02:45:51 -05:00
xml-tests.el Merge from origin/emacs-28 2022-01-01 07:03:03 -05:00