Merge pull request #1304 from slluis/mac-proxy-autoconfig
[mono.git] / mono / utils / mono-threads-freebsd.c
1 #include <config.h>
2
3 #if defined(__FreeBSD__)
4
5 #include <pthread.h>
6 #include <pthread_np.h>
7
8 void
9 mono_threads_core_get_stack_bounds (guint8 **staddr, size_t *stsize)
10 {
11         pthread_attr_t attr;
12         guint8 *current = (guint8*)&attr;
13
14         *staddr = NULL;
15         *stsize = (size_t)-1;
16
17         pthread_attr_init (&attr);
18         pthread_attr_get_np (pthread_self (), &attr);
19
20         pthread_attr_getstack (&attr, (void**)staddr, stsize);
21         pthread_attr_destroy (&attr);
22 }
23
24 #endif