From b84693501af6521487327ec4eb7c6ae0097ac5d7 Mon Sep 17 00:00:00 2001 From: John Baldwin Date: Thu, 27 Jan 2022 10:34:35 -0800 Subject: [PATCH] Use an unsigned 64-bit integer for exception class. This matches the type in other unwind headers (LLVM libunwind, libcxxrt, glibc). NB: include/unwind.h is not installed but is only used by libthr Reviewed by: imp, dim, emaste Differential Revision: https://reviews.freebsd.org/D34049 --- include/unwind.h | 4 ++-- lib/libthr/thread/thr_exit.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/include/unwind.h b/include/unwind.h index 5a07fd819f50..214fb43730aa 100644 --- a/include/unwind.h +++ b/include/unwind.h @@ -70,7 +70,7 @@ typedef void (*_Unwind_Exception_Cleanup_Fn) (_Unwind_Reason_Code, struct _Unwind_Exception *); typedef _Unwind_Reason_Code (*_Unwind_Stop_Fn) (int, _Unwind_Action, - __int64_t, + __uint64_t, struct _Unwind_Exception *, struct _Unwind_Context *, void *); @@ -82,7 +82,7 @@ typedef _Unwind_Reason_Code (*_Unwind_Stop_Fn) (int, _Unwind_Action, IA-64, while being more general. */ struct _Unwind_Exception { - __int64_t exception_class; + __uint64_t exception_class; _Unwind_Exception_Cleanup_Fn exception_cleanup; unsigned long private_1; unsigned long private_2; diff --git a/lib/libthr/thread/thr_exit.c b/lib/libthr/thread/thr_exit.c index 78497c4a206a..c1244962f192 100644 --- a/lib/libthr/thread/thr_exit.c +++ b/lib/libthr/thread/thr_exit.c @@ -61,7 +61,7 @@ static void thread_unwind(void) __dead2; static void thread_uw_init(void); static _Unwind_Reason_Code thread_unwind_stop(int version, _Unwind_Action actions, - int64_t exc_class, + uint64_t exc_class, struct _Unwind_Exception *exc_obj, struct _Unwind_Context *context, void *stop_parameter); /* unwind library pointers */ @@ -133,7 +133,7 @@ thread_unwind_cleanup(_Unwind_Reason_Code code __unused, static _Unwind_Reason_Code thread_unwind_stop(int version __unused, _Unwind_Action actions, - int64_t exc_class __unused, + uint64_t exc_class __unused, struct _Unwind_Exception *exc_obj __unused, struct _Unwind_Context *context, void *stop_parameter __unused) {