summaryrefslogtreecommitdiff
path: root/darwin_stop_world.c
diff options
context:
space:
mode:
authorJay Krell <jaykrell@microsoft.com>2018-02-26 07:53:37 +0300
committerIvan Maidanski <ivmai@mail.ru>2018-02-26 08:38:16 +0300
commit72a2ada7f32d4485a7b39f4e22f1aa43ca045584 (patch)
tree8e10cccbdb8796cb18c38f98393f5a1e36c2b9e0 /darwin_stop_world.c
parentc3f6e726f9ec620d78fd74514d1053abcacfaa01 (diff)
downloadbdwgc-72a2ada7f32d4485a7b39f4e22f1aa43ca045584.tar.gz
Change Darwin-specific code to comply with C++11 standard
Issue #206 (bdwgc). * darwin_stop_world.c (GC_stack_range_for): Cast pointer which is assinged to lo local variable to ptr_t (instead of void*). * os_dep.c [GC_DARWIN_THREADS && MPROTECT_VDB]: Include darwin_stop_world.h (so that GC_mprotect_stop and GC_mprotect_resume to be declared and later defined as extern "C"). * os_dep.c [MPROTECT_VDB && DARWIN] (exc_server, exception_raise, exception_raise_state): Wrap into extern "C" block; refine comment. * os_dep.c [MPROTECT_VDB && DARWIN] (catch_exception_raise_state, catch_exception_raise_state_identity): Declare as extern "C" (before the definition). * os_dep.c [MPROTECT_VDB && DARWIN && THREADS] (GC_mprotect_state): Initialize to GC_MP_NORMAL (instead of integer 0).
Diffstat (limited to 'darwin_stop_world.c')
-rw-r--r--darwin_stop_world.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/darwin_stop_world.c b/darwin_stop_world.c
index 3a8441e7..fd04fcd2 100644
--- a/darwin_stop_world.c
+++ b/darwin_stop_world.c
@@ -208,7 +208,7 @@ STATIC ptr_t GC_stack_range_for(ptr_t *phi, thread_act_t thread, GC_thread p,
ABORT("thread_get_state failed");
# if defined(I386)
- lo = (void *)state.THREAD_FLD(esp);
+ lo = (ptr_t)state.THREAD_FLD(esp);
# ifndef DARWIN_DONT_PARSE_STACK
*phi = GC_FindTopOfStack(state.THREAD_FLD(esp));
# endif
@@ -221,7 +221,7 @@ STATIC ptr_t GC_stack_range_for(ptr_t *phi, thread_act_t thread, GC_thread p,
GC_push_one(state.THREAD_FLD(ebp));
# elif defined(X86_64)
- lo = (void *)state.THREAD_FLD(rsp);
+ lo = (ptr_t)state.THREAD_FLD(rsp);
# ifndef DARWIN_DONT_PARSE_STACK
*phi = GC_FindTopOfStack(state.THREAD_FLD(rsp));
# endif
@@ -243,7 +243,7 @@ STATIC ptr_t GC_stack_range_for(ptr_t *phi, thread_act_t thread, GC_thread p,
GC_push_one(state.THREAD_FLD(r15));
# elif defined(POWERPC)
- lo = (void *)(state.THREAD_FLD(r1) - PPC_RED_ZONE_SIZE);
+ lo = (ptr_t)(state.THREAD_FLD(r1) - PPC_RED_ZONE_SIZE);
# ifndef DARWIN_DONT_PARSE_STACK
*phi = GC_FindTopOfStack(state.THREAD_FLD(r1));
# endif
@@ -280,7 +280,7 @@ STATIC ptr_t GC_stack_range_for(ptr_t *phi, thread_act_t thread, GC_thread p,
GC_push_one(state.THREAD_FLD(r31));
# elif defined(ARM32)
- lo = (void *)state.THREAD_FLD(sp);
+ lo = (ptr_t)state.THREAD_FLD(sp);
# ifndef DARWIN_DONT_PARSE_STACK
*phi = GC_FindTopOfStack(state.THREAD_FLD(r[7])); /* fp */
# endif
@@ -296,7 +296,7 @@ STATIC ptr_t GC_stack_range_for(ptr_t *phi, thread_act_t thread, GC_thread p,
GC_push_one(state.THREAD_FLD(lr));
# elif defined(AARCH64)
- lo = (void *)state.THREAD_FLD(sp);
+ lo = (ptr_t)state.THREAD_FLD(sp);
# ifndef DARWIN_DONT_PARSE_STACK
*phi = GC_FindTopOfStack(state.THREAD_FLD(fp));
# endif