We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent f8162a0 commit 0e9b2bcCopy full SHA for 0e9b2bc
src/runtime/cgo/gcc_stack_unix.c
@@ -18,16 +18,9 @@ x_cgo_getstackbound(G *g)
18
void *addr;
19
size_t size;
20
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.
+#if defined(__GLIBC__) || defined(__sun)
25
pthread_getattr_np(pthread_self(), &attr); // GNU extension
26
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
31
#else
32
pthread_attr_init(&attr);
33
pthread_attr_getstacksize(&attr, &size);
0 commit comments