diff options
author | davidxu <davidxu@FreeBSD.org> | 2010-09-15 02:56:32 +0000 |
---|---|---|
committer | davidxu <davidxu@FreeBSD.org> | 2010-09-15 02:56:32 +0000 |
commit | b00fcaa22c4d87d8f0c95731f5e8325abfbc2075 (patch) | |
tree | fedf4c03bd378db206ea154a805f96e271f05b28 /lib/libthr/thread/thr_init.c | |
parent | 6be463abbb69aa61ab186c9cba314068612328ba (diff) | |
download | FreeBSD-src-b00fcaa22c4d87d8f0c95731f5e8325abfbc2075.zip FreeBSD-src-b00fcaa22c4d87d8f0c95731f5e8325abfbc2075.tar.gz |
add code to support stack unwinding when thread exits. note that only
defer-mode cancellation works, asynchrnous mode does not work because
it lacks of libuwind's support. stack unwinding is not enabled unless
LIBTHR_UNWIND_STACK is defined in Makefile.
Diffstat (limited to 'lib/libthr/thread/thr_init.c')
-rw-r--r-- | lib/libthr/thread/thr_init.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/libthr/thread/thr_init.c b/lib/libthr/thread/thr_init.c index c20f3c8..56541a8 100644 --- a/lib/libthr/thread/thr_init.c +++ b/lib/libthr/thread/thr_init.c @@ -413,6 +413,10 @@ init_main_thread(struct pthread *thread) &sched_param); thread->attr.prio = sched_param.sched_priority; +#ifdef _PTHREAD_FORCED_UNWIND + thread->unwind_stackend = _usrstack; +#endif + /* Others cleared to zero by thr_alloc() */ } |