Changeset View
Changeset View
Standalone View
Standalone View
head/lib/libthr/thread/thr_exit.c
Show First 20 Lines • Show All 113 Lines • ▼ Show 20 Lines | _Unwind_GetCFA(struct _Unwind_Context *context) | ||||
return (*uwl_getcfa)(context); | return (*uwl_getcfa)(context); | ||||
} | } | ||||
#else | #else | ||||
#pragma weak _Unwind_GetCFA | #pragma weak _Unwind_GetCFA | ||||
#pragma weak _Unwind_ForcedUnwind | #pragma weak _Unwind_ForcedUnwind | ||||
#endif /* PIC */ | #endif /* PIC */ | ||||
static void | static void | ||||
thread_unwind_cleanup(_Unwind_Reason_Code code, struct _Unwind_Exception *e) | thread_unwind_cleanup(_Unwind_Reason_Code code __unused, | ||||
struct _Unwind_Exception *e __unused) | |||||
{ | { | ||||
/* | /* | ||||
* Specification said that _Unwind_Resume should not be used here, | * Specification said that _Unwind_Resume should not be used here, | ||||
* instead, user should rethrow the exception. For C++ user, they | * instead, user should rethrow the exception. For C++ user, they | ||||
* should put "throw" sentence in catch(...) block. | * should put "throw" sentence in catch(...) block. | ||||
*/ | */ | ||||
PANIC("exception should be rethrown"); | PANIC("exception should be rethrown"); | ||||
} | } | ||||
static _Unwind_Reason_Code | static _Unwind_Reason_Code | ||||
thread_unwind_stop(int version, _Unwind_Action actions, | thread_unwind_stop(int version __unused, _Unwind_Action actions, | ||||
int64_t exc_class, | int64_t exc_class __unused, | ||||
struct _Unwind_Exception *exc_obj, | struct _Unwind_Exception *exc_obj __unused, | ||||
struct _Unwind_Context *context, void *stop_parameter) | struct _Unwind_Context *context, void *stop_parameter __unused) | ||||
{ | { | ||||
struct pthread *curthread = _get_curthread(); | struct pthread *curthread = _get_curthread(); | ||||
struct pthread_cleanup *cur; | struct pthread_cleanup *cur; | ||||
uintptr_t cfa; | uintptr_t cfa; | ||||
int done = 0; | int done = 0; | ||||
/* XXX assume stack grows down to lower address */ | /* XXX assume stack grows down to lower address */ | ||||
▲ Show 20 Lines • Show All 181 Lines • Show Last 20 Lines |