From 74a637bb29c1ab94cc378f5640f7b834a79a0b10 Mon Sep 17 00:00:00 2001 From: Thiago Macieira Date: Wed, 29 Jul 2009 17:23:44 +0200 Subject: Implement support for getting the stack base on AIX. --- src/3rdparty/webkit/JavaScriptCore/runtime/Collector.cpp | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/3rdparty/webkit/JavaScriptCore/runtime/Collector.cpp b/src/3rdparty/webkit/JavaScriptCore/runtime/Collector.cpp index dddd83d..b8c91d1 100644 --- a/src/3rdparty/webkit/JavaScriptCore/runtime/Collector.cpp +++ b/src/3rdparty/webkit/JavaScriptCore/runtime/Collector.cpp @@ -536,6 +536,18 @@ static inline void* currentThreadStackBase() stack_t s; thr_stksegment(&s); return s.ss_sp; +#elif PLATFORM(AIX) + pthread_t thread = pthread_self(); + struct __pthrdsinfo threadinfo; + char regbuf[256]; + int regbufsize = sizeof regbuf; + + if (pthread_getthrds_np(&thread, PTHRDSINFO_QUERY_ALL, + &threadinfo, sizeof threadinfo, + ®buf, ®bufsize) == 0) + return threadinfo.__pi_stackaddr; + + return 0; #elif PLATFORM(OPENBSD) pthread_t thread = pthread_self(); stack_t stack; -- cgit v0.12