X-Git-Url: http://wien.tomnetworks.com/gitweb/?a=blobdiff_plain;f=mono%2Futils%2Fmach-support.h;h=abc135bd4eb8eb9987db2bb56f5bbf6aadf59093;hb=6b139f4c98eb90bfb7e1285933fc682dae541cad;hp=06b34e8689b1aac3837da6c262d681dbd3b27ee4;hpb=c133ae2dc82c0533f5790333a3c93b2635b9c43c;p=mono.git diff --git a/mono/utils/mach-support.h b/mono/utils/mach-support.h index 06b34e8689b..abc135bd4eb 100644 --- a/mono/utils/mach-support.h +++ b/mono/utils/mach-support.h @@ -6,6 +6,7 @@ #include #include #include "mono/utils/mono-compiler.h" +#include "mono/utils/mono-context.h" #include #include #include @@ -15,26 +16,30 @@ #define MONO_MACH_ARCH_SUPPORTED 1 #if defined(__arm__) typedef _STRUCT_MCONTEXT *mcontext_t; +#elif defined(__aarch64__) +typedef _STRUCT_MCONTEXT64 *mcontext_t; #endif // We need to define this here since we need _XOPEN_SOURCE for mono // and the pthread header guards against this extern pthread_t pthread_from_mach_thread_np(mach_port_t); -void *mono_mach_arch_get_ip (thread_state_t state) MONO_INTERNAL; -void *mono_mach_arch_get_sp (thread_state_t state) MONO_INTERNAL; +void *mono_mach_arch_get_ip (thread_state_t state); +void *mono_mach_arch_get_sp (thread_state_t state); +void mono_mach_init (pthread_key_t key); -int mono_mach_arch_get_mcontext_size (void) MONO_INTERNAL; -void mono_mach_arch_thread_state_to_mcontext (thread_state_t state, mcontext_t context) MONO_INTERNAL; -void mono_mach_arch_mcontext_to_thread_state (mcontext_t context, thread_state_t state) MONO_INTERNAL; +int mono_mach_arch_get_mcontext_size (void); +void mono_mach_arch_thread_state_to_mcontext (thread_state_t state, void *context); +void mono_mach_arch_mcontext_to_thread_state (void *context, thread_state_t state); +void mono_mach_arch_thread_state_to_mono_context (thread_state_t state, MonoContext *context); -int mono_mach_arch_get_thread_state_size (void) MONO_INTERNAL; -kern_return_t mono_mach_get_threads (thread_act_array_t *threads, guint32 *count) MONO_INTERNAL; -kern_return_t mono_mach_free_threads (thread_act_array_t threads, guint32 count) MONO_INTERNAL; -kern_return_t mono_mach_arch_get_thread_state (thread_port_t thread, thread_state_t state, mach_msg_type_number_t *count) MONO_INTERNAL; -kern_return_t mono_mach_arch_set_thread_state (thread_port_t thread, thread_state_t state, mach_msg_type_number_t count) MONO_INTERNAL; -void *mono_mach_arch_get_tls_value_from_thread (pthread_t thread, guint32 key) MONO_INTERNAL; -void *mono_mach_get_tls_address_from_thread (pthread_t thread, pthread_key_t key) MONO_INTERNAL; +int mono_mach_arch_get_thread_state_size (void); +kern_return_t mono_mach_get_threads (thread_act_array_t *threads, guint32 *count); +kern_return_t mono_mach_free_threads (thread_act_array_t threads, guint32 count); +kern_return_t mono_mach_arch_get_thread_state (thread_port_t thread, thread_state_t state, mach_msg_type_number_t *count); +kern_return_t mono_mach_arch_set_thread_state (thread_port_t thread, thread_state_t state, mach_msg_type_number_t count); +void *mono_mach_arch_get_tls_value_from_thread (pthread_t thread, guint32 key); +void *mono_mach_get_tls_address_from_thread (pthread_t thread, pthread_key_t key); #endif #endif /* __MONO_MACH_SUPPORT_H__ */