summaryrefslogtreecommitdiff
path: root/darwin_stop_world.c
diff options
context:
space:
mode:
authorIvan Maidanski <ivmai@mail.ru>2015-05-17 21:03:22 +0300
committerIvan Maidanski <ivmai@mail.ru>2015-05-17 21:03:22 +0300
commit7aba59b5853330c9368bc16dd606e1617c704334 (patch)
tree36edbe13bebd4957cd9c2cddc78aada6d186e0b7 /darwin_stop_world.c
parentdaa6cd949f6d374528b7a1305ffaff2bb094a66d (diff)
parentdcfbceb89f1d2dd9fa334467d19d5422fdc3e2ca (diff)
downloadbdwgc-7aba59b5853330c9368bc16dd606e1617c704334.tar.gz
Merge branch 'profiling-callbacks'
Diffstat (limited to 'darwin_stop_world.c')
-rw-r--r--darwin_stop_world.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/darwin_stop_world.c b/darwin_stop_world.c
index 84c60eb2..aa58993e 100644
--- a/darwin_stop_world.c
+++ b/darwin_stop_world.c
@@ -583,6 +583,9 @@ GC_INNER void GC_stop_world(void)
kern_result = thread_suspend(p->stop_info.mach_thread);
if (kern_result != KERN_SUCCESS)
ABORT("thread_suspend failed");
+ if (GC_on_collection_event)
+ GC_on_collection_event(GC_EVENT_THREAD_SUSPENDED,
+ (void *)p->stop_info.mach_thread);
}
}
}
@@ -697,6 +700,9 @@ GC_INNER void GC_start_world(void)
if ((p->flags & FINISHED) == 0 && !p->thread_blocked &&
p->stop_info.mach_thread != my_thread)
GC_thread_resume(p->stop_info.mach_thread);
+ if (GC_on_collection_event)
+ GC_on_collection_event(GC_EVENT_THREAD_UNSUSPENDED,
+ (void *)p->stop_info.mach_thread);
}
}