diff options
author | davidxu <davidxu@FreeBSD.org> | 2010-09-25 01:57:47 +0000 |
---|---|---|
committer | davidxu <davidxu@FreeBSD.org> | 2010-09-25 01:57:47 +0000 |
commit | 74604ed9c419ab380cacaaeb78e4c26f9f37e0ad (patch) | |
tree | 7b4cd520f700d5e2d7a21bc8175c8574d209a3ce /lib/libthr/thread/thr_init.c | |
parent | df0d735bfefbd56b7c7cbca4590c651f83e3c831 (diff) | |
download | FreeBSD-src-74604ed9c419ab380cacaaeb78e4c26f9f37e0ad.zip FreeBSD-src-74604ed9c419ab380cacaaeb78e4c26f9f37e0ad.tar.gz |
To support stack unwinding for cancellation points, add -fexceptions flag
for them, two functions _pthread_cancel_enter and _pthread_cancel_leave
are added to let thread enter and leave a cancellation point, it also
makes it possible that other functions can be cancellation points in
libraries without having to be rewritten in libthr.
Diffstat (limited to 'lib/libthr/thread/thr_init.c')
-rw-r--r-- | lib/libthr/thread/thr_init.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/libthr/thread/thr_init.c b/lib/libthr/thread/thr_init.c index 56541a8..e8a01d3 100644 --- a/lib/libthr/thread/thr_init.c +++ b/lib/libthr/thread/thr_init.c @@ -248,7 +248,9 @@ static pthread_func_t jmp_table[][2] = { {DUAL_ENTRY(_pthread_sigmask)}, /* PJT_SIGMASK */ {DUAL_ENTRY(_pthread_testcancel)}, /* PJT_TESTCANCEL */ {DUAL_ENTRY(__pthread_cleanup_pop_imp)},/* PJT_CLEANUP_POP_IMP */ - {DUAL_ENTRY(__pthread_cleanup_push_imp)}/* PJT_CLEANUP_PUSH_IMP */ + {DUAL_ENTRY(__pthread_cleanup_push_imp)},/* PJT_CLEANUP_PUSH_IMP */ + {DUAL_ENTRY(_pthread_cancel_enter)}, /* PJT_CANCEL_ENTER */ + {DUAL_ENTRY(_pthread_cancel_leave)} /* PJT_CANCEL_LEAVE */ }; static int init_once = 0; |