[cert-sync]: Make the new store the default and add '--legacy' for the old one.
[mono-project.git] / mono / utils / mach-support.c
blob314b30d972c2b18c065f33f6978a050b64bb10f0
1 /*
2 * mach-support-x86.c: mach support for x86
4 * Authors:
5 * Geoff Norton (gnorton@novell.com)
7 * (C) 2010 Ximian, Inc.
8 */
10 #include <config.h>
11 #if defined(__MACH__)
12 #include <glib.h>
13 #include <mach/mach.h>
14 #include <mach/task.h>
15 #include <mach/mach_port.h>
16 #include <mach/thread_act.h>
17 #include <mach/thread_status.h>
19 #include <mono/utils/mono-mmap.h>
21 #include "mach-support.h"
23 kern_return_t
24 mono_mach_get_threads (thread_act_array_t *threads, guint32 *count)
26 kern_return_t ret;
28 do {
29 ret = task_threads (current_task (), threads, count);
30 } while (ret == KERN_ABORTED);
32 return ret;
35 kern_return_t
36 mono_mach_free_threads (thread_act_array_t threads, guint32 count)
38 return vm_deallocate(current_task (), (vm_address_t) threads, sizeof (thread_t) * count);
40 #endif