diff options
author | Ivan Maidanski <ivmai@mail.ru> | 2012-01-28 17:19:25 +0400 |
---|---|---|
committer | Ivan Maidanski <ivmai@mail.ru> | 2012-01-28 17:19:25 +0400 |
commit | b13f86dc8707b9ae8279f6a071ecbbb88efb9d6a (patch) | |
tree | c39eef0835784c724435a5f5a004ed9d5b70e077 /mark.c | |
parent | 010a90ec82fab64072b5c46127ad6b439eac8bfb (diff) | |
download | bdwgc-b13f86dc8707b9ae8279f6a071ecbbb88efb9d6a.tar.gz |
Parallel-marker code refactoring (replace GC_markers with GC_markers_m1)
* include/private/gc_priv.h (GC_markers): Replace with GC_markers_m1
(which is GC_markers minus one); update the comment.
* mark.c (GC_markers): Likewise.
* mark.c (GC_help_marker): Replace GC_markers with GC_markers_m1.
* pthread_support.c (GC_is_mach_marker, start_mark_threads,
GC_segment_is_thread_stack, GC_fork_child_proc, GC_thr_init): Likewise.
* win32_threads.c (GC_get_next_stack, start_mark_threads,
GC_wait_marker, GC_notify_all_marker, GC_thr_init): Likewise.
Diffstat (limited to 'mark.c')
-rw-r--r-- | mark.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -1017,7 +1017,7 @@ STATIC void GC_do_local_mark(mse *local_mark_stack, mse *local_top) #define ENTRIES_TO_GET 5 -GC_INNER int GC_markers = 2; /* Normally changed by thread-library- */ +GC_INNER int GC_markers_m1 = 1; /* Normally changed by thread-library- */ /* -specific code. */ /* Mark using the local mark stack until the global mark stack is empty */ @@ -1179,7 +1179,7 @@ GC_INNER void GC_help_marker(word my_mark_no) GC_wait_marker(); } my_id = GC_helper_count; - if (GC_mark_no != my_mark_no || my_id >= (unsigned)GC_markers) { + if (GC_mark_no != my_mark_no || my_id > (unsigned)GC_markers_m1) { /* Second test is useful only if original threads can also */ /* act as helpers. Under Linux they can't. */ GC_release_mark_lock(); |