#include <mach/thread_act.h>
#include <mach/thread_status.h>
-#include <mono/arch/x86/x86-codegen.h>
-#include <mono/metadata/appdomain.h>
-#include <mono/metadata/debug-helpers.h>
-#include <mono/metadata/mono-debug.h>
#include <mono/utils/mono-mmap.h>
#include "mach-support.h"
do {
ret = task_threads (current_task (), threads, count);
- } while (ret != KERN_SUCCESS);
+ } while (ret == KERN_ABORTED);
return ret;
}
+
+kern_return_t
+mono_mach_free_threads (thread_act_array_t threads, guint32 count)
+{
+ return vm_deallocate(current_task (), (vm_address_t) threads, sizeof (thread_t) * count);
+}
#endif