aboutsummaryrefslogtreecommitdiffstats
path: root/src/lisp.h
diff options
context:
space:
mode:
authorPaul Eggert2019-04-24 13:35:14 -0700
committerPaul Eggert2019-04-24 13:37:15 -0700
commit4c90369d77d3db1cbd37df7857e4706176fd7ba2 (patch)
tree424f9c8b819feef66314316974290bd7f1edc8fd /src/lisp.h
parentc5358e831f05cdd110f12a4260e6fb607c66c0b4 (diff)
downloademacs-4c90369d77d3db1cbd37df7857e4706176fd7ba2.tar.gz
emacs-4c90369d77d3db1cbd37df7857e4706176fd7ba2.zip
Simplify thread initialization and GC
* src/lisp.h (PVECHEADERSIZE): New macro. (XSETPVECTYPESIZE): Use it. * src/search.c (syms_of_search): No need to initialize or staticpro last_thing_searched or saved_last_thing_searched, as the thread code arranges for initialization and GC. * src/thread.c (main_thread): Initialize statically. (Fmake_mutex, Fmake_condition_variable, Fmake_thread): Use ALLOCATE_ZEROED_PSEUDOVECTOR rather than zeroing by hand. (mark_one_thread): No need to mark Lisp_Object members. (init_main_thread, init_threads_once): Remove. All uses removed.
Diffstat (limited to 'src/lisp.h')
-rw-r--r--src/lisp.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/lisp.h b/src/lisp.h
index 703fe76d64e..70b2aa270e0 100644
--- a/src/lisp.h
+++ b/src/lisp.h
@@ -1279,11 +1279,11 @@ INLINE bool
1279 1279
1280#define XSETPVECTYPE(v, code) \ 1280#define XSETPVECTYPE(v, code) \
1281 ((v)->header.size |= PSEUDOVECTOR_FLAG | ((code) << PSEUDOVECTOR_AREA_BITS)) 1281 ((v)->header.size |= PSEUDOVECTOR_FLAG | ((code) << PSEUDOVECTOR_AREA_BITS))
1282#define PVECHEADERSIZE(code, lispsize, restsize) \
1283 (PSEUDOVECTOR_FLAG | ((code) << PSEUDOVECTOR_AREA_BITS) \
1284 | ((restsize) << PSEUDOVECTOR_SIZE_BITS) | (lispsize))
1282#define XSETPVECTYPESIZE(v, code, lispsize, restsize) \ 1285#define XSETPVECTYPESIZE(v, code, lispsize, restsize) \
1283 ((v)->header.size = (PSEUDOVECTOR_FLAG \ 1286 ((v)->header.size = PVECHEADERSIZE (code, lispsize, restsize))
1284 | ((code) << PSEUDOVECTOR_AREA_BITS) \
1285 | ((restsize) << PSEUDOVECTOR_SIZE_BITS) \
1286 | (lispsize)))
1287 1287
1288/* The cast to union vectorlike_header * avoids aliasing issues. */ 1288/* The cast to union vectorlike_header * avoids aliasing issues. */
1289#define XSETPSEUDOVECTOR(a, b, code) \ 1289#define XSETPSEUDOVECTOR(a, b, code) \