summaryrefslogtreecommitdiff
path: root/src/w32term.h
diff options
context:
space:
mode:
authorEli Zaretskii <eliz@gnu.org>2017-10-14 11:13:47 +0300
committerEli Zaretskii <eliz@gnu.org>2017-10-14 11:13:47 +0300
commitaa0c38f3586d462c7b4d489542b32580f489fdc5 (patch)
tree1838179ddc22be065247fe00d1c2cb5e922d097c /src/w32term.h
parentd7038020aa0a868c74cddaed5733ad6eeb73406b (diff)
downloademacs-aa0c38f3586d462c7b4d489542b32580f489fdc5.tar.gz
Make sure thread stack is properly aligned on MS-Windows
* src/systhread.c: Include w32term.h instead of windows.h. (w32_beginthread_wrapper): Add ALIGN_STACK attribute, to ensure the thread's stack is correctly aligned. * src/w32term.h (ALIGN_STACK): Update commentary.
Diffstat (limited to 'src/w32term.h')
-rw-r--r--src/w32term.h15
1 files changed, 8 insertions, 7 deletions
diff --git a/src/w32term.h b/src/w32term.h
index 16b44b0ca2f..8d08ca0a2bf 100644
--- a/src/w32term.h
+++ b/src/w32term.h
@@ -22,13 +22,14 @@ along with GNU Emacs. If not, see <https://www.gnu.org/licenses/>. */
#include "frame.h"
#include "atimer.h"
-/* Stack alignment stuff. Every CALLBACK function should have the
- ALIGN_STACK attribute if it manipulates Lisp objects, because
- Windows x86 32-bit ABI only guarantees 4-byte stack alignment, and
- that is what we will get when a Windows function calls us. The
- ALIGN_STACK attribute forces GCC to emit a preamble code to
- re-align the stack at function entry. Further details about this
- can be found in http://www.peterstock.co.uk/games/mingw_sse/. */
+/* Stack alignment stuff. Every CALLBACK and thread function should
+ have the ALIGN_STACK attribute if it manipulates Lisp objects,
+ because Windows x86 32-bit ABI only guarantees 4-byte stack
+ alignment, and that is what we will get when a Windows function
+ calls us. The ALIGN_STACK attribute forces GCC to emit a preamble
+ code to re-align the stack at function entry. Further details
+ about this can be found in
+ http://www.peterstock.co.uk/games/mingw_sse/. */
#ifdef __GNUC__
# if USE_STACK_LISP_OBJECTS && !defined _WIN64 && !defined __x86_64__ \
&& __GNUC__ + (__GNUC_MINOR__ > 1) >= 5