summaryrefslogtreecommitdiff
path: root/darwin_stop_world.c
diff options
context:
space:
mode:
authorIvan Maidanski <ivmai@mail.ru>2015-05-17 18:23:52 +0300
committerIvan Maidanski <ivmai@mail.ru>2015-05-17 18:23:52 +0300
commitdcfbceb89f1d2dd9fa334467d19d5422fdc3e2ca (patch)
tree0e76bfb69df970be9298e90f3626ef611cec5aa7 /darwin_stop_world.c
parent7cd987a1656fb2c9e38adc79027c1f0ef080f5df (diff)
downloadbdwgc-dcfbceb89f1d2dd9fa334467d19d5422fdc3e2ca.tar.gz
Code refactoring of "event callbacks" functionality
* alloc.c (GC_on_collection_event): Remove declaration (moved to gc_priv.h). * darwin_stop_world.c (GC_on_collection_event): Likewise. * pthread_stop_world.c (GC_on_collection_event): Likewise. * win32_threads.c (GC_on_collection_event): Likewise. * alloc.c (start_world): Rename to start_world_inner; inline it. * darwin_stop_world.c (GC_start_world): Wrap long code lines. * pthread_stop_world.c (GC_suspend_all, GC_start_world): Likewise. * win32_threads.c (GC_stop_world, GC_start_world): Likewise. * include/gc.h: Remove trailing space at EOLn. * include/private/gc_priv.h (GC_on_collection_event): Declare global variable (using GC_EXTERN). * misc.c (GC_on_collection_event): Add GC_INNER; replace NULL to 0.
Diffstat (limited to 'darwin_stop_world.c')
-rw-r--r--darwin_stop_world.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/darwin_stop_world.c b/darwin_stop_world.c
index 32b1ea64..2ef74af1 100644
--- a/darwin_stop_world.c
+++ b/darwin_stop_world.c
@@ -458,8 +458,6 @@ STATIC GC_bool GC_suspend_thread_list(thread_act_array_t act_list, int count,
#endif /* !GC_NO_THREADS_DISCOVERY */
-extern GC_on_collection_event_proc GC_on_collection_event;
-
/* Caller holds allocation lock. */
GC_INNER void GC_stop_world(void)
{
@@ -660,7 +658,8 @@ GC_INNER void GC_start_world(void)
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);
+ GC_on_collection_event(GC_EVENT_THREAD_UNSUSPENDED,
+ (void *)p->stop_info.mach_thread);
}
}