2006-11-02 George Staikos <staikos@kde.org>
authorstaikos <staikos@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 3 Nov 2006 10:01:09 +0000 (10:01 +0000)
committerstaikos <staikos@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 3 Nov 2006 10:01:09 +0000 (10:01 +0000)
        Reviewed by Maciej.

        * collector.cpp:
        Remove a deprecated pthreads call.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@17566 268f45cc-cd09-0410-ab3c-d52691b4dbfc

JavaScriptCore/ChangeLog
JavaScriptCore/kjs/collector.cpp

index 6214536..e32e195 100644 (file)
@@ -1,3 +1,10 @@
+2006-11-02  George Staikos <staikos@kde.org>
+
+        Reviewed by Maciej.
+
+        * collector.cpp:
+        Remove a deprecated pthreads call.
+
 2006-11-02  Anders Carlsson  <acarlsson@apple.com>
 
         Reviewed by Maciej, landed by Anders.
index 108c995..31eb4aa 100644 (file)
@@ -332,10 +332,11 @@ void Collector::markCurrentThreadConservatively()
         // FIXME: this function is non-portable; other POSIX systems may have different np alternatives
         pthread_getattr_np(thread, &sattr);
 #endif
-        // Should work but fails on Linux (?)
-        //  pthread_attr_getstack(&sattr, &stackBase, &stackSize);
-        pthread_attr_getstackaddr(&sattr, &stackBase);
+        size_t stackSize;
+        int rc = pthread_attr_getstack(&sattr, &stackBase, &stackSize);
+        (void)rc; // FIXME: deal with error code somehow?  seems fatal...
         assert(stackBase);
+        stackBase = (void*)(size_t(stackBase) + stackSize);
         stackThread = thread;
     }
 #else