From 57e29ac3b86fa70d1a8209ae5be48b1cbcce215e Mon Sep 17 00:00:00 2001 From: ptitSeb Date: Sun, 7 Mar 2021 13:43:08 +0100 Subject: Small adjustment to cancel thread handling --- src/libtools/threads.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/libtools/threads.c') diff --git a/src/libtools/threads.c b/src/libtools/threads.c index 90fc8f96..d35b0d4f 100755 --- a/src/libtools/threads.c +++ b/src/libtools/threads.c @@ -127,20 +127,20 @@ static void FreeCancelThread(box64context_t* context) static __pthread_unwind_buf_t* AddCancelThread(x64_unwind_buff_t* buff) { __pthread_unwind_buf_t* r = (__pthread_unwind_buf_t*)calloc(1, sizeof(__pthread_unwind_buf_t)); - buff->__pad[1] = r; + buff->__pad[3] = r; return r; } static __pthread_unwind_buf_t* GetCancelThread(x64_unwind_buff_t* buff) { - return (__pthread_unwind_buf_t*)buff->__pad[1]; + return (__pthread_unwind_buf_t*)buff->__pad[3]; } static void DelCancelThread(x64_unwind_buff_t* buff) { - __pthread_unwind_buf_t* r = (__pthread_unwind_buf_t*)buff->__pad[1]; + __pthread_unwind_buf_t* r = (__pthread_unwind_buf_t*)buff->__pad[3]; free(r); - buff->__pad[1] = NULL; + buff->__pad[3] = NULL; } typedef struct emuthread_s { -- cgit 1.4.1