summaryrefslogtreecommitdiff
path: root/win32_threads.c
diff options
context:
space:
mode:
authorIvan Maidanski <ivmai@mail.ru>2018-11-07 23:34:04 +0300
committerIvan Maidanski <ivmai@mail.ru>2018-11-07 23:34:04 +0300
commit93374170974aba0e9992c5acedb52d887f237a93 (patch)
tree35d345fc070dd3d5cbbc68b2dd60e886c7aad900 /win32_threads.c
parent36a6d79e182861a70c53a604e36bb34a8bad7bd1 (diff)
downloadbdwgc-93374170974aba0e9992c5acedb52d887f237a93.tar.gz
Use GC_WORD_MAX macro across all C source files
(code refactoring) * alloc.c (GC_collect_at_heapsize, GC_compute_heap_usage_percent, GC_add_to_heap, GC_expand_hp_inner): Use GC_WORD_MAX instead of (word)-1. * dyn_load.c [DATASTART_IS_FUNC] (GC_register_dynamic_libraries_dl_iterate_phdr): Likewise. * finalize.c [KEEP_BACK_PTRS] (GC_notify_or_invoke_finalizers): Likewise. * headers.c (GC_install_counts): Likewise. * include/private/thread_local_alloc.h [GC_GCJ_SUPPORT] (ERROR_FL): Likewise. * os_dep.c [NEED_FIND_LIMIT || USE_PROC_FOR_LIBRARIES] (GC_find_limit): Likewise. * os_dep.c [MPROTECT_VDB && DARWIN] (GC_mprotect_thread): Likewise. * pthread_support.c [PARALLEL_MARK] (GC_mark_thread): Likewise. * win32_threads.c (ADDR_LIMIT): Likewise. * win32_threads.c [PARALLEL_MARK] (GC_mark_thread): Likewise. * alloc.c (GC_least_plausible_heap_addr): Use GC_WORD_MAX instead of ONES macro. * include/private/gc_priv.h [STACK_GROWS_DOWN] (MAKE_COOLER): Likewise. * mark.c (GC_set_hdr_marks): Likewise. * alloc.c (GC_WORD_MAX): Remove definition (in this file). * headers.c (GC_install_counts): Reformat code. * include/private/gc_priv.h (ONES): Rename to GC_WORD_MAX.
Diffstat (limited to 'win32_threads.c')
-rw-r--r--win32_threads.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/win32_threads.c b/win32_threads.c
index cec6729e..a2a8203e 100644
--- a/win32_threads.c
+++ b/win32_threads.c
@@ -168,7 +168,7 @@ GC_API void GC_CALL GC_use_threads_discovery(void)
STATIC DWORD GC_main_thread = 0;
-#define ADDR_LIMIT ((ptr_t)(word)-1)
+#define ADDR_LIMIT ((ptr_t)GC_WORD_MAX)
struct GC_Thread_Rep {
union {
@@ -1744,7 +1744,7 @@ GC_INNER void GC_get_next_stack(char *start, char *limit,
{
word my_mark_no = 0;
- if ((word)id == (word)-1) return 0; /* to make compiler happy */
+ if ((word)id == GC_WORD_MAX) return 0; /* to prevent a compiler warning */
marker_sp[(word)id] = GC_approx_sp();
# ifdef IA64
marker_bsp[(word)id] = GC_save_regs_in_stack();