[LoongArch64] Part-5:add loongarch support in some files for LoongArch64. (#21769)
[mono-project.git] / mono / utils / mono-threads-haiku.c
blobfb159760780ad33ac1aa78d0c50b59df17cce645
1 #include <config.h>
3 #if defined(__HAIKU__)
5 #include <mono/utils/mono-threads.h>
6 #include <pthread.h>
7 #include <os/kernel/OS.h>
9 void
10 mono_threads_platform_get_stack_bounds (guint8 **staddr, size_t *stsize)
12 thread_info ti;
13 get_thread_info(get_pthread_thread_id(pthread_self()), &ti);
15 *staddr = ti.stack_base;
16 *stsize = ti.stack_end - ti.stack_base;
19 guint64
20 mono_native_thread_os_id_get (void)
22 return (guint64)get_pthread_thread_id (pthread_self ());
25 #else
27 #include <mono/utils/mono-compiler.h>
29 MONO_EMPTY_SOURCE_FILE (mono_threads_haiku);
31 #endif