Skip to content

Commit 0e9b2bc

Browse files
prattmicgopherbot
authored andcommitted
Revert "runtime/cgo: use pthread_attr_get_np on Illumos"
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 <[email protected]> TryBot-Result: Gopher Robot <[email protected]> Run-TryBot: Michael Pratt <[email protected]> Reviewed-by: Than McIntosh <[email protected]>
1 parent f8162a0 commit 0e9b2bc

File tree

1 file changed

+1
-8
lines changed

1 file changed

+1
-8
lines changed

src/runtime/cgo/gcc_stack_unix.c

+1-8
Original file line numberDiff line numberDiff line change
@@ -18,16 +18,9 @@ x_cgo_getstackbound(G *g)
1818
void *addr;
1919
size_t size;
2020

21-
#if defined(__GLIBC__) || (defined(__sun) && !defined(__illumos__))
22-
// pthread_getattr_np is a GNU extension supported in glibc.
23-
// Solaris is not glibc but does support pthread_getattr_np
24-
// (and the fallback doesn't work...). Illumos does not.
21+
#if defined(__GLIBC__) || defined(__sun)
2522
pthread_getattr_np(pthread_self(), &attr); // GNU extension
2623
pthread_attr_getstack(&attr, &addr, &size); // low address
27-
#elif defined(__illumos__)
28-
pthread_attr_init(&attr);
29-
pthread_attr_get_np(pthread_self(), &attr);
30-
pthread_attr_getstack(&attr, &addr, &size); // low address
3124
#else
3225
pthread_attr_init(&attr);
3326
pthread_attr_getstacksize(&attr, &size);

0 commit comments

Comments
 (0)