+inline java_objectheader **builtin_get_exceptionptrptr()
+{
+#if defined(USE_THREADS) && defined(NATIVE_THREADS)
+ return &THREADINFO->_exceptionptr;
+#else
+ panic("builtin_get_exceptionptrptr should not be used in this configuration");
+ return NULL;
+#endif
+}
+
+inline methodinfo **builtin_get_threadrootmethod()
+{
+#if defined(USE_THREADS) && defined(NATIVE_THREADS)
+ return &THREADINFO->_threadrootmethod;
+#else
+ panic("builting_get_threadrootmethod should not be used in this configuration");
+ return NULL;
+#endif
+}
+
+/* returns the root method of a thread. this is used in asmpart.S and delivers the abort condition
+ for the stack unwinding for getClassContext and getClassLoader. For the main thread this is the main function.
+ Otherwhise it is the thread's run method (at least that's how I see it) (jowenn) */
+methodinfo *builtin_asm_get_threadrootmethod();
+
+/* returns the current top element of the stack frame info list (needed for unwinding across native functions) */
+/* on i386 this is a pointer to a structure
+ ------------------------------------------------
+ | return adress out of native stub |
+ | pointer to method info | either i have to save an arbitrary adress within this native stub or the pointer to the method info, both are equaly costly, I have chosen the method info (JOWENN)
+ | pointer to thread specific top of this list |<----stack frame begin
+points here---->| previous element in list |
+ ------------------------------------------------
+*/
+void *builtin_asm_get_stackframeinfo();
+stacktraceelement *builtin_stacktrace_copy(stacktraceelement **,stacktraceelement *begin, stacktraceelement *end);