]> git.eshelyaron.com Git - emacs.git/commit
Fix struct thread alignment on FreeBSD x86
authorPaul Eggert <eggert@cs.ucla.edu>
Fri, 19 Oct 2018 16:06:52 +0000 (09:06 -0700)
committerPaul Eggert <eggert@cs.ucla.edu>
Fri, 19 Oct 2018 16:26:50 +0000 (09:26 -0700)
commitd2a07b9a82a632e8baa179c667a98d275e5f6973
treeaa9ba321dc84936722b5345f67bf089678840bc6
parentfc3f93705543408b868feb7b93b8d77ab1c6ae53
Fix struct thread alignment on FreeBSD x86

Problem reported by Joseph Mingrone in:
https://lists.gnu.org/r/emacs-devel/2018-10/msg00238.html
While we’re at it, apply a similar fix to struct Lisp_Subr; this
removes the need for GCALIGNED_STRUCT_MEMBER and thus can shrink
struct Lisp_Subr a bit.
* configure.ac (HAVE_STRUCT_ATTRIBUTE_ALIGNED): Bring back this macro.
Although used only for performance (not to actually align
structures), we might as well take advantage of it.
* src/lisp.h (GCALIGNED_STRUCT_MEMBER): Remove; all uses removed.
(union Aligned_Lisp_Subr): New type, like struct Lisp_Subr but aligned.
* src/lisp.h (XSUBR, DEFUN):
* src/lread.c (defsubr): Use it.  All callers changed.
* src/thread.c (union aligned_thread_state): New type.
(main_thread): Now of this type, so it’s aligned.
All uses changed.
* src/xmenu.c (syms_of_xmenu) [USE_GTK || USE_X_TOOLKIT]:
Adjust to union Aligned_Lisp_Subr change.
configure.ac
src/lisp.h
src/lread.c
src/thread.c
src/xmenu.c