9 #include <mono/utils/mono-threads.h>
13 mono_threads_platform_get_stack_bounds (guint8
**staddr
, size_t *stsize
)
15 /* see GC_push_all_stacks in libgc/aix_irix_threads.c
16 for why we do this; pthread_getattr_np exists only
17 on some versions of AIX and not on PASE, so use a
18 legacy way to get the stack information */
19 struct __pthrdsinfo pi
;
31 res
= pthread_getthrds_np(&pt
, PTHRDSINFO_QUERY_ALL
, &pi
, ps
, rb
, &rbv
);
32 /* FIXME: are these the right values? */
33 *staddr
= (void*)(pi
.__pi_stackaddr
);
35 * ruby doesn't use stacksize; see:
36 * github.com/ruby/ruby/commit/a2594be783c727c6034308f5294333752c3845bb
38 *stsize
= pi
.__pi_stackend
- pi
.__pi_stackaddr
;