summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThiago Macieira <thiago.macieira@nokia.com>2009-07-29 15:23:44 (GMT)
committerKent Hansen <khansen@trolltech.com>2009-09-04 10:41:01 (GMT)
commit74a637bb29c1ab94cc378f5640f7b834a79a0b10 (patch)
tree9e9bee803a0801e26d8426698a82fbc743f1506f
parent2f3c0ff756234712dd87498216ce24d48c0725be (diff)
downloadQt-74a637bb29c1ab94cc378f5640f7b834a79a0b10.zip
Qt-74a637bb29c1ab94cc378f5640f7b834a79a0b10.tar.gz
Qt-74a637bb29c1ab94cc378f5640f7b834a79a0b10.tar.bz2
Implement support for getting the stack base on AIX.
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/runtime/Collector.cpp12
1 files changed, 12 insertions, 0 deletions
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,
+ &regbuf, &regbufsize) == 0)
+ return threadinfo.__pi_stackaddr;
+
+ return 0;
#elif PLATFORM(OPENBSD)
pthread_t thread = pthread_self();
stack_t stack;