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