1 /** 2 * \file 3 */ 4 5 #include <config.h> 6 7 #if defined(__FreeBSD__) 8 9 #include <mono/utils/mono-threads.h> 10 #include <pthread.h> 11 #include <pthread_np.h> 12 13 void mono_threads_platform_get_stack_bounds(guint8 ** staddr,size_t * stsize)14mono_threads_platform_get_stack_bounds (guint8 **staddr, size_t *stsize) 15 { 16 pthread_attr_t attr; 17 guint8 *current = (guint8*)&attr; 18 19 *staddr = NULL; 20 *stsize = (size_t)-1; 21 22 pthread_attr_init (&attr); 23 pthread_attr_get_np (pthread_self (), &attr); 24 25 pthread_attr_getstack (&attr, (void**)staddr, stsize); 26 pthread_attr_destroy (&attr); 27 } 28 29 #endif 30