Update Haiku support (#15674)
[mono-project.git] / mono / utils / mono-threads-netbsd.c
blobb4704c6734ef77dce38db9ce02f0d4409226577e
1 /**
2 * \file
3 */
5 #include <config.h>
7 #if defined(__NetBSD__)
9 #include <mono/utils/mono-threads.h>
10 #include <pthread.h>
11 #include <lwp.h>
13 void
14 mono_threads_platform_get_stack_bounds (guint8 **staddr, size_t *stsize)
16 pthread_attr_t attr;
18 *staddr = NULL;
19 *stsize = (size_t)-1;
21 pthread_attr_init (&attr);
22 pthread_attr_get_np (pthread_self (), &attr);
24 pthread_attr_getstack (&attr, (void**)staddr, stsize);
25 pthread_attr_destroy (&attr);
28 guint64
29 mono_native_thread_os_id_get (void)
31 return (guint64)_lwp_self ();
34 #endif