summaryrefslogtreecommitdiff
path: root/typd_mlc.c
diff options
context:
space:
mode:
authorhboehm <hboehm>2009-06-10 02:28:41 +0200
committerIvan Maidanski <ivmai@mail.ru>2011-07-26 19:06:45 +0200
commit686e786031b6d289bb20af32cc57ec3208185237 (patch)
tree5fbe2ce55b0ba2c5b729a760599d05ad399593fc /typd_mlc.c
parente68f38cbcb4fdf46412738205e5316e27cfe6c7d (diff)
2009-06-09 Hans Boehm <Hans.Boehm@hp.com> (Really Ivan Maidanski)
diff90_cvs (resembling diff28, diff30, diff32, diff34, diff47, diff49, diff60, diff62, diff66, diff67, diff68, diff72 partly) * finalize.c (finalization_mark_proc): Replace K&R-style declaration with ANSI C one. * finalize.c (GC_grow_table, GC_register_finalizer_inner, GC_enqueue_all_finalizers): Remove outdated comments about disabling signals. * finalize.c (GC_general_register_disappearing_link): Fix assertion to catch NULL "obj" value. * finalize.c (GC_unregister_disappearing_link): Check "link" alignment before gaining the lock. * finalize.c (GC_finalize): Refine comment. * finalize.c (GC_finalize): Fix WARN() format specifier (should be word-complient, "%p" is used w/o "0x"). * finalize.c (GC_invoke_finalizers): Initialize "bytes_freed_before" variable (to 0) to suppress compiler warning. * include/gc_gcj.h (MARK_DESCR_OFFSET): Move to private/gc_pmark.h. * include/gc_gcj.h: add "extern C" header and tail. * include/private/gc_pmark.h: Remove GC_do_parallel_mark(), GC_help_wanted, GC_helper_count, GC_active_count declarations (move the comments to the place where these symbols are defined in mark.c). * mark.c: Add STATIC GC_do_parallel_mark() declaration (for use by GC_mark_some_inner, if PARALLEL_MARK only). * mark.c (GC_mark_some_inner, GC_help_wanted, GC_helper_count, GC_active_count, GC_do_parallel_mark): Define as STATIC. * pthread_support.c (GC_mark_thread): Ditto. * typd_mlc.c (GC_explicit_typing_initialized, GC_explicit_kind, GC_array_kind, GC_ext_descriptors, GC_ed_size, GC_avail_descr, GC_typed_mark_proc_index, GC_array_mark_proc_index, GC_eobjfreelist, GC_arobjfreelist): Ditto. * include/private/gc_pmark.h (PUSH_CONTENTS_HDR): Change GC_ASSERT for HBLKSIZE to GC_STATIC_ASSERT. * mark.c (GC_noop): Define for Borland C the same as for Watcom. * mark.c (GC_noop, GC_mark_and_push): Add ARGSUSED tag. * pthread_support.c (GC_do_blocking_inner): Ditto. * mark.c (GC_mark_from): Initialize "limit" (to 0) in the default switch branch to suppress compiler warning. * mark.c (GC_return_mark_stack): Append new-line to printf message. * mark.c: Remove unused GC_true_func(), GC_PUSH_ALL(). * pthread_support.c (GC_mark_thread): Add dummy "return 0" to suppress compiler warning. * pthread_support.c (start_mark_threads): Move the code limiting "GC_markers" value (and printing a warning) to GC_thr_init(). * pthread_support.c (GC_thr_init): Silently limit "GC_markers" value if based on the number of CPUs. * pthread_support.c (GC_thr_init): Treat incorrect "GC_markers" values as one. * pthread_support.c (GC_register_my_thread_inner): Add a check for "stack_end" is non-NULL (the same as in win32_threads.c). * pthread_support.c (pthread_create): Call GC_oom_fn before giving up with ENOMEM. * thread_local_alloc.c (return_single_freelist): Convert "for" loop to "while" one to suppress "possible extraneous ';'" warning.
Diffstat (limited to 'typd_mlc.c')
-rw-r--r--typd_mlc.c24
1 files changed, 13 insertions, 11 deletions
diff --git a/typd_mlc.c b/typd_mlc.c
index 7d030f8..2c79098 100644
--- a/typd_mlc.c
+++ b/typd_mlc.c
@@ -41,12 +41,14 @@
# define TYPD_EXTRA_BYTES (sizeof(word) - EXTRA_BYTES)
-GC_bool GC_explicit_typing_initialized = FALSE;
+STATIC GC_bool GC_explicit_typing_initialized = FALSE;
-int GC_explicit_kind; /* Object kind for objects with indirect */
+STATIC int GC_explicit_kind;
+ /* Object kind for objects with indirect */
/* (possibly extended) descriptors. */
-int GC_array_kind; /* Object kind for objects with complex */
+STATIC int GC_array_kind;
+ /* Object kind for objects with complex */
/* descriptors and GC_array_mark_proc. */
/* Extended descriptors. GC_typed_mark_proc understands these. */
@@ -86,16 +88,16 @@ typedef union ComplexDescriptor {
} complex_descriptor;
#define TAG ld.ld_tag
-ext_descr * GC_ext_descriptors; /* Points to array of extended */
- /* descriptors. */
+STATIC ext_descr * GC_ext_descriptors; /* Points to array of extended */
+ /* descriptors. */
-size_t GC_ed_size = 0; /* Current size of above arrays. */
+STATIC size_t GC_ed_size = 0; /* Current size of above arrays. */
# define ED_INITIAL_SIZE 100;
-size_t GC_avail_descr = 0; /* Next available slot. */
+STATIC size_t GC_avail_descr = 0; /* Next available slot. */
-int GC_typed_mark_proc_index; /* Indices of my mark */
-int GC_array_mark_proc_index; /* procedures. */
+STATIC int GC_typed_mark_proc_index; /* Indices of my mark */
+STATIC int GC_array_mark_proc_index; /* procedures. */
static void GC_push_typed_structures_proc (void)
{
@@ -330,9 +332,9 @@ complex_descriptor * GC_make_complex_array_descriptor(word nelements,
}
#endif
-ptr_t * GC_eobjfreelist;
+STATIC ptr_t * GC_eobjfreelist;
-ptr_t * GC_arobjfreelist;
+STATIC ptr_t * GC_arobjfreelist;
STATIC mse * GC_typed_mark_proc(word * addr, mse * mark_stack_ptr,
mse * mark_stack_limit, word env);