about summary refs log tree commit diff stats
path: root/src/libtools/threads32.c
diff options
context:
space:
mode:
authorptitSeb <sebastien.chev@gmail.com>2024-10-06 14:31:51 +0200
committerptitSeb <sebastien.chev@gmail.com>2024-10-06 14:31:51 +0200
commitae080c3ad3a15f346b4182fdf2cf50947fde6355 (patch)
treeaee27634aaefb8455801d232f66164ad07c5fb73 /src/libtools/threads32.c
parentad0c08c2de2dde9e60fd4537f3e4b53c89a468eb (diff)
downloadbox64-ae080c3ad3a15f346b4182fdf2cf50947fde6355.tar.gz
box64-ae080c3ad3a15f346b4182fdf2cf50947fde6355.zip
[BOX32] Forgot a few more x86 structure to properly align
Diffstat (limited to 'src/libtools/threads32.c')
-rwxr-xr-xsrc/libtools/threads32.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/libtools/threads32.c b/src/libtools/threads32.c
index cd365827..ae2a48c7 100755
--- a/src/libtools/threads32.c
+++ b/src/libtools/threads32.c
@@ -53,7 +53,7 @@ typedef struct threadstack_s {
 } threadstack_t;
 
 // longjmp / setjmp
-typedef struct jump_buff_i386_s {
+typedef struct __attribute__((packed, aligned(4))) jump_buff_i386_s {
  uint32_t save_ebx;
  uint32_t save_esi;
  uint32_t save_edi;
@@ -63,7 +63,7 @@ typedef struct jump_buff_i386_s {
 } jump_buff_i386_t;
 
 // sigset_t should have the same size on 32bits and 64bits machine (64bits)
-typedef struct __jmp_buf_tag_s {
+typedef struct __attribute__((packed, aligned(4))) __jmp_buf_tag_s {
     jump_buff_i386_t __jmpbuf;
     int              __mask_was_saved;
     sigset_t         __saved_mask;
@@ -75,8 +75,8 @@ typedef struct i386_unwind_buff_s {
 		int					__mask_was_saved;
 	} __cancel_jmp_buf[1];
 	ptr_t __pad[2];
-	void* __pad3;
-} i386_unwind_buff_t __attribute__((__aligned__));
+	ptr_t __pad3;
+} __attribute__((packed, aligned(4))) i386_unwind_buff_t;
 
 // those are define in thread.c
 emuthread_t* thread_get_et();
@@ -496,7 +496,7 @@ static void del_cond(void* cond)
 	mutex_unlock(&my_context->mutex_thread);
 }
 
-typedef struct pthread_cond_2_0_s {
+typedef struct __attribute__((packed, aligned(4))) pthread_cond_2_0_s {
 	ptr_t cond;	// pthread_cond_t*
 } pthread_cond_2_0_t;