[tools] Add nuget-hash-extractor tool to help produce the runtime ignored assemblies...
[mono-project.git] / mono / utils / mono-threads-openbsd.c
blob7e2e0e21e2e3fe36d2b9e19cef50ef11018b2df5
1 #include <config.h>
3 #if defined(__OpenBSD__)
5 #include <pthread.h>
6 #include <pthread_np.h>
8 void
9 mono_threads_platform_get_stack_bounds (guint8 **staddr, size_t *stsize)
11 /* TODO : Determine if this code is actually still needed. It may already be covered by the case above. */
12 pthread_attr_t attr;
13 guint8 *current = (guint8*)&attr;
15 *staddr = NULL;
16 *stsize = (size_t)-1;
18 pthread_attr_init (&attr);
20 stack_t ss;
21 int rslt;
23 rslt = pthread_stackseg_np (pthread_self (), &ss);
24 g_assert (rslt == 0);
26 *staddr = (guint8*)((size_t)ss.ss_sp - ss.ss_size);
27 *stsize = ss.ss_size;
29 pthread_attr_destroy (&attr);
32 #endif