summaryrefslogtreecommitdiff
path: root/win32_threads.c
diff options
context:
space:
mode:
authorivmai <ivmai>2009-10-19 17:06:58 +0200
committerIvan Maidanski <ivmai@mail.ru>2011-07-26 19:06:51 +0200
commitabf7e47fd85223a03d61285455508c14c413b805 (patch)
tree0ac56929c6b36d3c343891b40e4de40a9e8d8bac /win32_threads.c
parentf84081f69e577171577ae05e2663d9cbb663720c (diff)
2009-10-19 Ivan Maidanski <ivmai@mail.ru>
* include/private/gc_priv.h (GC_INNER): New macro (for GC-scope variable definitions). * include/private/gc_priv.h (GC_EXTERN): Update the comment. * allchblk.c (GC_unmap_threshold): Define as GC_INNER. * alloc.c (GC_incremental, GC_world_stopped, GC_n_heap_sects, GC_n_memory, GC_fail_count): Ditto. * blacklst.c (GC_black_list_spacing, GC_print_heap_obj): Ditto. * gcj_mlc.c (GC_gcj_malloc_initialized, GC_gcjobjfreelist): Ditto. * mach_dep.c (GC_save_regs_ret_val): Ditto. * mark.c (GC_n_mark_procs, GC_obj_kinds, GC_n_kinds, GC_mark_stack, GC_mark_stack_limit, GC_mark_stack_size, GC_mark_stack_top, GC_mark_state, GC_mark_stack_too_small, GC_mark_no, GC_markers): Ditto. * mark_rts.c (GC_root_size, GC_push_typed_structures): Ditto. * misc.c (GC_allocate_ml, GC_debugging_started, GC_check_heap, GC_print_all_smashed, GC_print_back_height, GC_dump_regularly, GC_backtraces, GC_force_unmap_on_gcollect, GC_large_alloc_warn_interval, GC_is_initialized, GC_write_cs, GC_current_warn_proc, GC_blocked_sp, GC_activation_frame): Ditto. * os_dep.c (GC_page_size, GC_dont_query_stack_min, GC_no_win32_dlls, GC_wnt, GC_sysinfo, GC_push_other_roots, GC_dirty_maintained, GC_fault_handler_lock): Ditto. * pthread_support.c (GC_allocate_ml, GC_lock_holder, GC_need_to_lock, GC_thr_initialized, GC_threads, GC_in_thread_creation, GC_collecting, GC_allocate_lock, GC_mark_lock_holder): Ditto. * reclaim.c (GC_bytes_found, GC_fl_builder_count, GC_have_errors): Ditto. * win32_threads.c (GC_allocate_ml, GC_lock_holder, GC_need_to_lock, GC_mark_lock_holder, GC_collecting): Ditto. * extra/gc.c (GC_INNER, GC_EXTERN): Define as STATIC. * mach_dep.c (GC_with_callee_saves_pushed): Remove redundant {}. * os_dep.c (GC_init_win32): Reformat the comment.
Diffstat (limited to 'win32_threads.c')
-rw-r--r--win32_threads.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/win32_threads.c b/win32_threads.c
index 1ca9d32..dd8268b 100644
--- a/win32_threads.c
+++ b/win32_threads.c
@@ -27,12 +27,12 @@
/* Allocation lock declarations. */
#if !defined(USE_PTHREAD_LOCKS)
- CRITICAL_SECTION GC_allocate_ml;
- DWORD GC_lock_holder = NO_THREAD;
+ GC_INNER CRITICAL_SECTION GC_allocate_ml;
+ GC_INNER DWORD GC_lock_holder = NO_THREAD;
/* Thread id for current holder of allocation lock */
#else
- pthread_mutex_t GC_allocate_ml = PTHREAD_MUTEX_INITIALIZER;
- unsigned long GC_lock_holder = NO_THREAD;
+ GC_INNER pthread_mutex_t GC_allocate_ml = PTHREAD_MUTEX_INITIALIZER;
+ GC_INNER unsigned long GC_lock_holder = NO_THREAD;
#endif
#ifdef GC_PTHREADS
@@ -151,7 +151,7 @@ typedef LONG * IE_t;
STATIC GC_bool GC_thr_initialized = FALSE;
-GC_bool GC_need_to_lock = FALSE;
+GC_INNER GC_bool GC_need_to_lock = FALSE;
static GC_bool parallel_initialized = FALSE;
@@ -1473,7 +1473,7 @@ void GC_get_next_stack(char *start, char *limit,
}
# ifdef GC_ASSERTIONS
- unsigned long GC_mark_lock_holder = NO_THREAD;
+ GC_INNER unsigned long GC_mark_lock_holder = NO_THREAD;
# endif
/* GC_mark_threads[] is unused here unlike that in pthread_support.c */
@@ -2608,7 +2608,7 @@ void GC_init_parallel(void)
/* Pthread_mutex_try_lock may not win here, */
/* due to builtin support for spinning first? */
- volatile GC_bool GC_collecting = 0;
+ GC_INNER volatile GC_bool GC_collecting = 0;
/* A hint that we're in the collector and */
/* holding the allocation lock for an */
/* extended period. */