[vmkit-commits] [vmkit] r103380 - /vmkit/trunk/include/mvm/Threads/Thread.h
Nicolas Geoffray
nicolas.geoffray at lip6.fr
Sun May 9 08:35:42 PDT 2010
Author: geoffray
Date: Sun May 9 10:35:42 2010
New Revision: 103380
URL: http://llvm.org/viewvc/llvm-project?rev=103380&view=rev
Log:
Add a stackOverflow method to check for Java stack overflow in C++ land.
Modified:
vmkit/trunk/include/mvm/Threads/Thread.h
Modified: vmkit/trunk/include/mvm/Threads/Thread.h
URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/include/mvm/Threads/Thread.h?rev=103380&r1=103379&r2=103380&view=diff
==============================================================================
--- vmkit/trunk/include/mvm/Threads/Thread.h (original)
+++ vmkit/trunk/include/mvm/Threads/Thread.h Sun May 9 10:35:42 2010
@@ -339,6 +339,12 @@
///
static const uint64_t StackOverflowMask = 0xC0000;
+ /// stackOverflow - Returns if there is a stack overflow in Java land.
+ ///
+ bool stackOverflow() {
+ return ((uintptr_t)__builtin_frame_address(0) & StackOverflowMask) == 0;
+ }
+
/// operator new - Allocate the Thread object as well as the stack for this
/// Thread. The thread object is inlined in the stack.
///
More information about the vmkit-commits
mailing list