summaryrefslogtreecommitdiffstats
path: root/lib/libc_r/uthread/pthread_private.h
diff options
context:
space:
mode:
authorpeter <peter@FreeBSD.org>2001-10-26 21:19:22 +0000
committerpeter <peter@FreeBSD.org>2001-10-26 21:19:22 +0000
commit14e9bfa8fe88e6350016240194199cefbd2c3d47 (patch)
treeeecbcf12bbd3734f9d86b3bf3acdc1a2169fece3 /lib/libc_r/uthread/pthread_private.h
parent6d1df6cd852ab6f870e101152652f0aaad76b1bc (diff)
downloadFreeBSD-src-14e9bfa8fe88e6350016240194199cefbd2c3d47.zip
FreeBSD-src-14e9bfa8fe88e6350016240194199cefbd2c3d47.tar.gz
Make libc_r check the kern.usrstack sysctl instead of using internal
kernel #defines to figure out where the stack is located. This stops libc_r from exploding when the kernel is compiled with a different KVM size. IMHO this is all kinda bogus, it would be better to just check %esp and work from that.
Diffstat (limited to 'lib/libc_r/uthread/pthread_private.h')
-rw-r--r--lib/libc_r/uthread/pthread_private.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/lib/libc_r/uthread/pthread_private.h b/lib/libc_r/uthread/pthread_private.h
index 9af2090..151fd03 100644
--- a/lib/libc_r/uthread/pthread_private.h
+++ b/lib/libc_r/uthread/pthread_private.h
@@ -881,6 +881,13 @@ struct pthread {
* Global variables for the uthread kernel.
*/
+SCLASS void *_usrstack
+#ifdef GLOBAL_PTHREAD_PRIVATE
+= (void *) USRSTACK;
+#else
+;
+#endif
+
/* Kernel thread structure used when there are no running threads: */
SCLASS struct pthread _thread_kern_thread;
OpenPOWER on IntegriCloud