| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
| |
* pthread_stop_world.c (GC_suspend_thread): Do not clear
SUSPENDED_EXT flag in case of RAISE_SIGNAL() failure, add assertion
about FINISHED (in case of ESRCH), update comment.
* pthread_stop_world.c (GC_register_my_thread): Add assertion
that SUSPENDED_EXT flag is not set if the thread is registered from
a thread key destructor.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* pthread_stop_world.c (GC_suspend_handler_inner)
[GC_ENABLE_SUSPEND_THREAD]: If SUSPENDED_EXT flag then set
stop_info.stack_ptr, call sem_post(suspend_ack_sem), and call
suspend_self_inner instead of GC_do_blocking(suspend_self_inner).
* pthread_stop_world.c [GC_ENABLE_SUSPEND_THREAD] (GC_suspend_thread):
No-op if already suspended; UNLOCK before GC_do_blocking (if
self-suspend); add TODO about GC_retry_signals; clear SUSPENDED_EXT
flag if RAISE_SIGNAL failed with ESRCH code; sem_wait(suspend_ack_sem)
to let the suspend handler to lookup the thread and store stack_ptr
(and save registers if needed).
* pthread_stop_world.c (GC_suspend_all, GC_start_world): Skip threads
with SUSPENDED_EXT flag.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* pthread_stop_world.c (android_thread_kill) [USE_TKILL_ON_ANDROID]:
Move definition upper (to be before its first use); remove forward
declaration.
* pthread_stop_world.c (THREAD_SYSTEM_ID, RAISE_SIGNAL): New macro.
* pthread_stop_world.c (GC_suspend_thread): Remove "result" local
variable
* pthread_stop_world.c (GC_suspend_thread, GC_suspend_all,
GC_start_world): Use RAISE_SIGNAL() instead of pthread_kill and
android_thread_kill.
* pthread_stop_world.c (GC_suspend_all, GC_start_world): Remove
"thread_id" local variable; use THREAD_SYSTEM_ID instead of thread_id.
|
|
|
|
|
|
|
|
|
| |
* tests/test.c (tiny_reverse_test): Call GC_gcollect (only if
GC_ENABLE_SUSPEND_THREAD).
* tests/test.c: Include "javaxfc.h" if GC_ENABLE_SUSPEND_THREAD (and
GC_PTHREADS) to GC_suspend/resume_thread declared.
* tests/test.c (fork_a_thread): Test GC_is_thread_suspended,
GC_suspend_thread, GC_resume_thread (only if the functions defined).
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* CMakeLists.txt (enable_gcj_support): Define GC_ENABLE_SUSPEND_THREAD.
* configure.ac (enable_gcj_support): Likewise.
* doc/README.macros (GC_ENABLE_SUSPEND_THREAD): Document.
* include/gc.h (GC_suspend_thread, GC_resume_thread,
GC_is_thread_suspended): Move to javaxfc.h.
* include/gc_pthread_redirects.h (GC_SUSPEND_THREAD_ID): New macro.
* include/javaxfc.h (GC_SUSPEND_THREAD_ID): Likewise.
* include/javaxfc.h (GC_suspend_thread, GC_resume_thread,
GC_is_thread_suspended): Define if and only if GC_THREADS; refine
comment.
* include/javaxfc.h (GC_suspend_thread, GC_resume_thread,
GC_is_thread_suspended): Decorate with GC_CALL; change argument type
from pthread_t to GC_SUSPEND_THREAD_ID.
* pthread_stop_world.c (GC_suspend_thread, GC_resume_thread,
GC_is_thread_suspended): Likewise.
* pthread_stop_world.c (GC_suspend_handler): Move check for
SUSPENDED_EXT to GC_suspend_handler_inner (to avoid duplicate
GC_lookup_thread call).
* pthread_stop_world.c (suspend_self_inner, GC_TIME_LIMIT,
GC_brief_async_signal_safe_sleep, GC_suspend_thread, GC_resume_thread,
GC_is_thread_suspended): Do not defined unless
GC_ENABLE_SUSPEND_THREAD.
* pthread_stop_world.c (suspend_self): Remove (invoke
GC_do_blocking(suspend_self_inner) directly).
* pthread_stop_world.c (GC_brief_async_signal_safe_sleep): Decorate
with STATIC.
* pthread_stop_world.c (GC_suspend_thread, GC_resume_thread,
GC_is_thread_suspended): Wrap code into LOCK/UNLOCK (because, at least,
GC_lookup_thread should be called with the allocation lock held).
* pthread_stop_world.c (GC_suspend_thread, GC_resume_thread): Do not
ABORT if thread is unregistered in GC (just no-op instead).
* pthread_stop_world.c (GC_is_thread_suspended): Return 0 if thread is
not registered in GC.
|
|
|
|
|
|
|
|
|
|
|
|
| |
(Cherry-picked commit 30c2f0e from 'gcc_boehmgc' branch.)
* include/gc.h (GC_is_thread_suspended): Declare.
* pthread_stop_world.c (GC_is_thread_suspended): New function.
Conflicts:
* ChangeLog
* include/gc.h
* pthread_stop_world.c
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
(Cherry-picked commit 42fe54a from 'gcc_boehmgc' branch.)
* pthread_stop_world.c (GC_suspend_handler): Redirect to suspension
routine if signal is received and thread is flagged SUSPENDED_EXT.
* pthread_stop_world.c (GC_brief_async_signal_safe_sleep,
suspend_self_inner, suspend_self, GC_suspend_thread,
GC_resume_thread): New function.
* include/gc.h (GC_suspend_thread, GC_resume_thread): Declare.
* include/private/pthread_support.h (SUSPENDED_EXT): Update comment.
Conflicts:
* ChangeLog
* include/gc.h
* include/private/pthread_support.h
* pthread_stop_world.c
|
|
|
|
|
|
|
|
|
|
|
| |
(Code refactoring)
* pthread_stop_world.c (GC_suspend_handler_inner): Rename "sig_arg"
argument to "dummy"; mark it as GC_ATTR_UNUSED.
* pthread_stop_world.c (GC_suspend_handler): Pass NULL instead of sig
to GC_suspend_handler_inner.
* pthread_stop_world.c (GC_suspend_handler): Move sig check from
GC_suspend_handler_inner.
|
|
|
|
|
|
|
|
|
| |
* doc/README.macros (GC_ATTR_TLS_FAST): Document.
* include/private/thread_local_alloc.h (GC_ATTR_TLS_FAST): New macro
(empty by default).
* include/private/thread_local_alloc.h (GC_thread_key): Use
GC_ATTR_TLS_FAST.
* thread_local_alloc.c (GC_thread_key): Likewise.
|
|
|
|
| |
* doc/README.macros (USE_COMPILER_TLS): Remove duplicate description.
|
|
|
|
|
| |
* include/gc.h (GC_register_my_thread): Refine comment (about returned
value).
|
|
|
|
|
|
|
| |
(Cherry-picked commit f9711f5 from 'gcc_boehmgc' branch.)
* os_dep.c [PROC_VDB] (GC_dirty_init): Use /proc/<pid>/pagedata
instead of PIOCOPENPD; remove fd local variable; increase buf[] size.
|
|
|
|
|
|
|
|
| |
* include/private/pthread_support.h (GC_Thread_Rep): Do not declare
kernel_id field unless USE_TKILL_ON_ANDROID (instead of
PLATFORM_ANDROID).
* pthread_support.c (GC_new_thread, GC_remove_all_threads_but_me): Do
not set kernel_id field unless USE_TKILL_ON_ANDROID.
|
|
|
|
|
| |
* include/private/gc_priv.h (ABORT_ARG1, ABORT_ARG2, ABORT_ARG3): Use
GC_INFOLOG_PRINTF instead of GC_COND_LOG_PRINTF.
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
* dyn_load.c (GC_register_dynamic_libraries_dl_iterate_phdr):
Abort with the appropriate message if DATASTART is NULL or greater than
DATAEND (same for DATASTART2 and DATAEND2).
* os_dep.c (GC_init_linux_data_start, GC_register_data_segments):
Likewise.
* os_dep.c (GC_init_linux_data_start, GC_register_data_segments):
Remove assertion about DATASTART and DATAEND.
* os_dep.c (GC_init_linux_data_start): Code refactoring.
|
|
|
|
|
|
|
|
|
|
|
| |
* include/gc.h (GC_INIT_CONF_ROOTS): Handle Android clang (3.5-3.6)
case when "_end" symbol has incorrect address but "__end__" is defined
(by bfd linker only); declare "__end__" symbol as weak.
* include/private/gcconfig.h (DATAEND): Redefine for Android/clang;
define __end__ as weak symbol.
* os_dep.c (_end): Remove declaration (declared in gcconfig.h).
* os_dep.c (GC_init_linux_data_start): Define new local variable
(data_end); set it to DATAEND; use it instead of _end.
|
|
|
|
|
|
|
|
|
|
|
| |
* alloc.c (GC_expand_hp): Do not hold the allocation lock when calling
GC_init.
* malloc.c (GC_alloc_large, GC_generic_malloc_inner): Likewise.
* mallocx.c (GC_generic_malloc_many): Likewise.
* misc.c (GC_enable_incremental): Likewise.
* misc.c (GC_init): Surround GC_gcollect_inner call with LOCK/UNLOCK
(only if GC_ASSERTIONS and GC_ALWAYS_MULTITHREADED otherwise
redundant).
|
|
|
|
|
| |
* include/private/thread_local_alloc.h (USE_COMPILER_TLS): Do not
define for Android Clang (any CPU arch); update comment.
|
|
|
|
|
|
|
|
|
|
|
|
| |
(code refactoring)
* alloc.c (GC_try_to_collect_inner): Remove comment about expected
lock status; add assertion about holding the allocation lock.
* finalize.c (GC_grow_table): Likewise.
* malloc.c (GC_alloc_large, GC_alloc_large_and_clear,
GC_generic_malloc_inner, GC_generic_malloc_inner_ignore_off_page):
Likewise.
* misc.c (GC_new_free_list_inner): Likewise.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* include/private/gc_priv.h (GC_start_mark_threads_inner): Define macro
(or declare function depending on CAN_HANDLE_FORK).
* misc.c (GC_init): Surround GC_thr_init call with LOCK/UNLOCK (only
if GC_ASSERTIONS and GC_ALWAYS_MULTITHREADED otherwise redundant);
call GC_start_mark_threads_inner (if PARALLEL_MARK).
* pthread_support.c (GC_mark_thread): Update comment.
* win32_threads.c (GC_mark_thread): Likewise.
* pthread_support.c (start_mark_threads): Remove macro (moved to
gc_priv.h); rename function to GC_start_mark_threads_inner; replace
"static" to GC_INNER; check assertion on GC_fl_builder_count only if
the markers should actually be started; move the check for disabled
parallel markers (available_markers_m1) from GC_thr_init (make it
unconditional).
* win32_threads.c (start_mark_threads): Likewise.
* win32_threads.c (GC_start_mark_threads_inner): Add assertion about
the lock status.
* pthread_support.c (GC_thr_init): Remove comment about expected lock
status; add assertion about holding the lock (duplicating that in
GC_new_thread); remove start_mark_threads call (moved to GC_init).
* win32_threads.c (GC_thr_init): Likewise.
|
|
|
|
|
|
|
|
|
|
|
| |
(code refactoring)
* dyn_load.c (GC_register_map_entries,
GC_register_dynamic_libraries_dl_iterate_phdr): Remove redundant
casting to ptr_t of DATASTART, DATAEND, DATAEND2.
* os_dep.c (GC_register_data_segments): Likewise.
* include/private/gcconfig.h (DATAEND, DATASTART): Add cast to ptr_t
where missing.
|
|
|
|
|
|
|
|
| |
(code refactoring)
* include/private/gcconfig.h (DATASTART, DATAEND, STACKBOTTOM,
DATAEND2): Add outermost parentheses where missing; remove space in
cast.
|
|
|
|
|
|
|
|
|
| |
(Apply part of commit 21f0df7 from 'mono_libgc' branch.)
Conflicts:
* include/private/gc_locks.h
* include/private/gcconfig.h
* pthread_stop_world.c
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
(Apply commit b328e88 from 'mono_libgc' branch.)
* fix compile/runtime issues caused by upstream changes
* add NaCl glibc support
* various changes to support running tests in NaCl glibc
from 'make check'
Conflicts:
* dyn_load.c
* include/private/gcconfig.h
* misc.c
* pthread_stop_world.c
* pthread_support.c
|
|
|
|
|
|
|
|
| |
(Apply part of commit 204bcc6 from 'mono_libgc' branch.)
Conflicts:
* pthread_stop_world.c
* pthread_support.c
|
|
|
|
|
|
|
| |
(Apply part of commit 14b353e from 'mono_libgc' branch.)
* configure.ac: Handle *-*-nacl* (define GC_LINUX_THREADS and
NO_EXECUTE_PERMISSION).
|
|
|
|
|
|
|
|
|
|
| |
* gc.mak (CLEAN, BSC32_SBRS, LINK32_OBJS): Rename msvc_dbg.* to
msvc_dbg.copied.* file names.
* gc.mak (CLEAN): Erase msvc_dbg.copied.c, test.copied.c.
* gc.mak (msvc_dbg.copied.c): New rule.
* gc.mak (CLEAN, LINK32_OBJS, BSC32_SBRS, test.c): Rename test.* to
test.copied.* file names.
* gc.mak (CPP_PROJ): Add /D for "ALL_INTERIOR_POINTERS".
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
* include/private/gc_priv.h (GC_wait_for_markers_init): New prototype.
* mark.c (GC_wait_for_markers_init): New function (if PARALLEL_MARK).
* pthread_support.c (GC_mark_thread): Notify start_mark_threads()
about completion of marker data initialization.
* win32_threads.c (GC_mark_thread): Likewise.
* pthread_support.c (start_mark_threads): Add assertion about
GC_fl_builder_count; call GC_wait_for_markers_init.
* win32_threads.c (start_mark_threads): Likewise.
* win32_threads.c (GC_mark_thread): Reformat code.
|
|
|
|
|
|
| |
* cord/cordbscs.c (CORD_cat_char_star, CORD_cat): Cast "lenx" to
unsigned char (to workaround false compiler warning about value
truncation).
|
|
|
|
|
| |
* include/private/thread_local_alloc.h (USE_COMPILER_TLS): Do not
define if ARM32 (and PLATFORM_ANDROID and __clang__); update comment.
|
|
|
|
|
| |
* include/private/thread_local_alloc.h (USE_COMPILER_TLS): Define for
Android NDK clang3.6+ arm/arm64/x86/x86_64 (NDK r10e); update comment.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* windows-untested/vc60/gc.dsp (SOURCE): Fix paths to msvc_dbg.c and
msvc_dbg.h.
* windows-untested/vc60/libgc.dsp (SOURCE): Likewise.
* windows-untested/vc60/libgcmt.dsp (SOURCE): Likewise.
* windows-untested/vc60/libgcmt.dsp (File RelativePath): Likewise.
* windows-untested/vc70/libgc.vcproj (File RelativePath): Likewise.
* windows-untested/vc70/libgcmt.vcproj (File RelativePath): Likewise.
* windows-untested/vc71/gc.vcproj (File RelativePath): Likewise.
* windows-untested/vc71/libgc.vcproj (File RelativePath): Likewise.
* windows-untested/vc71/libgcmt.vcproj (File RelativePath): Likewise.
|
| |
|
|
|
|
| |
* doc/README.ews4800: Fix typos ("information", "vendor", "the").
|
|
|
|
|
|
|
| |
* gc.mak (CFG): Fix info about default configuration.
* gc.mak (CPP_PROJ): Replace deprecated /GX option with /EHsc; remove
deprecated /YX option; add /D _CRT_SECURE_NO_DEPRECATE option (to
suppress warning about vsprintf usage).
|
| |
|
|
|
|
|
| |
* include/private/gcconfig.h (GC_NO_SIGSETJMP): Do not define for
Android/x86 if NDK r8e+; update comment.
|
|
|
|
| |
* finalize.c (GC_move_long_link): Fix function name in abort message.
|
|
|
|
|
|
|
|
|
|
|
| |
* alloc.c (GC_set_stop_func, GC_try_to_collect): Use
NONNULL_ARG_NOT_NULL to check argument marked as non-null (in
function declaration) is actually non-null.
* finalize.c (GC_general_register_disappearing_link,
GC_register_long_link, GC_move_disappearing_link, GC_move_long_link):
Likewise.
* misc.c (GC_set_warn_proc, GC_set_abort_func, GC_set_oom_fn): Likewise.
* include/private/gc_priv.h (NONNULL_ARG_NOT_NULL): New macro.
|
|
|
|
|
| |
* include/private/gcconfig.h (CAN_CALL_ATFORK): Define also if
__ANDROID_API__ >= 21.
|
|
|
|
|
|
|
| |
(code refactoring)
* include/private/gcconfig.h (_end): Change char[] type to int[] (for
remaining entries).
|
|
|
|
|
|
|
|
|
|
|
| |
Client should define NO_SA_SIGACTION to enable the workaround.
* include/private/gcconfig.h (NO_SA_SIGACTION): New macro (explicitly
define if SA_SIGINFO undefined).
* include/private/gcconfig.h (MPROTECT_VDB): Undefine if
NO_SA_SIGACTION unless DARWIN, MSWIN32 or MSWINCE.
* pthread_stop_world.c (GC_suspend_handler, GC_stop_init): Check
NO_SA_SIGACTION instead of SA_SIGINFO.
|
|
|
|
|
|
|
|
|
|
|
|
| |
* include/private/gcconfig.h (_end): Replace type from char[] to int[]
to avoid redefinition error (as it is also declared in gc.h) for
Linux/x86_64.
* include/private/gcconfig.h (NO_GETCONTEXT): Define for all Android
targets.
* include/private/gcconfig.h (USE_TKILL_ON_ANDROID): New macro
(defined only for 32-bit Android targets).
* pthread_stop_world.c (tkill, android_thread_kill, GC_suspend_all,
GC_start_world): Use USE_TKILL_ON_ANDROID instead of PLATFORM_ANDROID.
|
|
|
|
|
| |
* pthread_stop_world.c (GC_suspend_all, GC_start_world): Cast thread_id
to pointer via word type on passing to GC_on_thread_event; add comment.
|
|
|
|
|
|
|
| |
(fix 'link_map redefinition' error on Android with API level 21+)
* dyn_load.c (link_map, r_debug): Do not define if android-21 (or
higher) API is used; update comment.
|
|
|
|
|
|
|
|
|
|
|
|
| |
Prevents the GC_thread_key from being cleared on thread exit until
after the thread has been unregistered by GC_unregister_my_thread_inner.
* include/private/thread_local_alloc.h (GC_remove_specific): Call
pthread_setspecific(key, NULL) if USE_PTHREAD_SPECIFIC; update comment.
* thread_local_alloc.c (reset_thread_key): New static function if
USE_PTHREAD_SPECIFIC); define (as macro) to 0 otherwise.
* thread_local_alloc.c (GC_init_thread_local): Pass reset_thread_key
(instead of 0) to GC_key_create.
|
|
|
|
|
|
|
|
|
| |
* configure.ac (enable_shared): Add -D GC_NO_VISIBILITY to CFLAGS if
not ac_cv_fvisibility_hidden.
* include/cord.h (CORD_API): Do not use visibility attribute if
GC_NO_VISIBILITY.
* include/gc_config_macros.h (GC_API): Likewise.
* include/private/gc_priv.h (GC_INNER, GC_API_OSCALL): Likewise.
|