]> granicus.if.org Git - gc/commit
Code refactoring of 'alt-stack registration support'
authorIvan Maidanski <ivmai@mail.ru>
Mon, 27 Jul 2015 07:34:35 +0000 (10:34 +0300)
committerIvan Maidanski <ivmai@mail.ru>
Mon, 27 Jul 2015 07:34:35 +0000 (10:34 +0300)
commit11601b978a7abfdc7ecc3d0ee5e2fb5b3e0b73f2
tree38ba4992faec4c9d8ca504fc898c88125bd4843f
parent4ceae609d3e20822d7818cdef732348053227e1a
Code refactoring of 'alt-stack registration support'

* darwin_stop_world.c (GC_stack_range_for, GC_push_all_stacks):
Reformat code dealing with alt-stack.
* pthread_stop_world.c (GC_push_all_stacks): Likewise.
* darwin_stop_world.c (GC_stack_range_for): Cast pointers to word when
compared.
* GC_push_all_stacks (GC_push_all_stacks): Likewise.
* include/gc.h (GC_register_altstack): Reformat comment; decorate with
GC_CALL; comment out argument names; change type of altstack_size and
stack_size to word.
* include/private/pthread_support.h (altstack, altstack_size, stack,
stack_size): Refine and reformat comment.
* include/private/pthread_support.h (altstack_size, stack_size): Change
type from int to word.
* pthread_support.c (main_stack_size, main_altstack_size): Likewise.
* pthread_support.c (main_pthread_self): Rename to main_pthread_id.
* pthread_support.c (GC_register_altstack): Decorate with GC_API and
GC_CALL.
* win32_threads.c (GC_register_altstack): Likewise.
* pthread_support.c (GC_register_altstack): Rename "thread" local
variable to "me"; new local variable "self"; use DCL_LOCK_STATE;
reformat code.
* pthread_support.c (GC_thr_init): New local variable "self"; compare
thread id using THREAD_EQUAL; reformat code.
* win32_threads.c (GC_register_altstack): Add GC_ATTR_UNUSED to all
arguments to avoid compiler warning (while the function is
unimplemented); add TODO.
darwin_stop_world.c
include/gc.h
include/private/pthread_support.h
pthread_stop_world.c
pthread_support.c
win32_threads.c