about summary refs log tree commit diff stats
path: root/src/libtools/threads32.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/libtools/threads32.h')
-rw-r--r--src/libtools/threads32.h26
1 files changed, 26 insertions, 0 deletions
diff --git a/src/libtools/threads32.h b/src/libtools/threads32.h
index 00a527d3..9bdce018 100644
--- a/src/libtools/threads32.h
+++ b/src/libtools/threads32.h
@@ -12,4 +12,30 @@ typedef struct fake_pthread_mutext_s {
 } fake_phtread_mutex_t;
 #define KIND_SIGN	0xbad001
 
+// longjmp / setjmp
+typedef struct jump_buff_i386_s {
+ uint32_t save_ebx;
+ uint32_t save_esi;
+ uint32_t save_edi;
+ uint32_t save_ebp;
+ uint32_t save_esp;
+ uint32_t save_eip;
+} jump_buff_i386_t;
+
+// sigset_t should have the same size on 32bits and 64bits machine (64bits)
+typedef struct __attribute__((packed, aligned(4))) __jmp_buf_tag_i386_s {
+    jump_buff_i386_t __jmpbuf;
+    int              __mask_was_saved;
+    sigset_t         __saved_mask;
+} __jmp_buf_tag_i386_t;
+
+typedef struct i386_unwind_buff_s {
+	struct {
+		jump_buff_i386_t	__cancel_jmp_buf;	
+		int					__mask_was_saved;
+	} __cancel_jmp_buf[1];
+	ptr_t __pad[2];
+	ptr_t __pad3;
+} __attribute__((packed, aligned(4))) i386_unwind_buff_t;
+
 #endif //__THREADS_32_H_
\ No newline at end of file