]> Cypherpunks repositories - gostls13.git/commitdiff
Revert "runtime/cgo: use pthread_attr_get_np on Illumos"
authorMichael Pratt <mpratt@google.com>
Mon, 17 Apr 2023 18:06:10 +0000 (14:06 -0400)
committerGopher Robot <gobot@golang.org>
Mon, 17 Apr 2023 18:43:56 +0000 (18:43 +0000)
This reverts CL 481795.

Reason for revert: CL 481061 causes C TSAN failures and must be
reverted. See CL 485275. This CL depends on CL 481061.

For #59678.

Change-Id: I5ec1f495154205ebdf19cd44c6e6452a7a3606f0
Reviewed-on: https://go-review.googlesource.com/c/go/+/485315
Auto-Submit: Michael Pratt <mpratt@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Run-TryBot: Michael Pratt <mpratt@google.com>
Reviewed-by: Than McIntosh <thanm@google.com>
src/runtime/cgo/gcc_stack_unix.c

index 71ac36ff1e2e4c81f7ae04de63f49223901ea289..5ca6a944298204d614d9190668693cc9cef1cccf 100644 (file)
@@ -18,16 +18,9 @@ x_cgo_getstackbound(G *g)
        void *addr;
        size_t size;
 
-#if defined(__GLIBC__) || (defined(__sun) && !defined(__illumos__))
-       // pthread_getattr_np is a GNU extension supported in glibc.
-       // Solaris is not glibc but does support pthread_getattr_np
-       // (and the fallback doesn't work...). Illumos does not.
+#if defined(__GLIBC__) || defined(__sun)
        pthread_getattr_np(pthread_self(), &attr);  // GNU extension
        pthread_attr_getstack(&attr, &addr, &size); // low address
-#elif defined(__illumos__)
-       pthread_attr_init(&attr);
-       pthread_attr_get_np(pthread_self(), &attr);
-       pthread_attr_getstack(&attr, &addr, &size); // low address
 #else
        pthread_attr_init(&attr);
        pthread_attr_getstacksize(&attr, &size);