summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAge
* Fix GC_INLINE definition to comply with ISO C90 standard (GCC)masterIvan Maidanski2013-08-15
| | | | | * include/private/gc_priv.h (GC_INLINE): Define as "static __inline" for GCC if "strict ISO/ANSI C90" mode is enforced.
* Define GC_VSNPRINTF internal macro in misc.c (code refactoring)Ivan Maidanski2013-08-15
| | | | | * misc.c (GC_VSNPRINTF): New macro (defined to vsnprintf by default and used by GC_PRINTF_FILLBUF).
* Update AUTHORS fileIvan Maidanski2013-08-01
|
* Fix more typos in commentsOndrej Bilka2013-07-31
| | | | | | | | | | | | | | | | | | | | | | | * darwin_stop_world.c (GC_use_threads_discovery): Fix a typo in comment ("stopped"). * doc/porting.html: Fix typos in comment ("defining", "support"). * include/gc.h (GC_get_prof_stats): Fix a typo in comment ("entries"). * include/private/gc_priv.h (GC_have_errors): Fix a typo in comment ("OK"). * include/private/gcconfig.h: Fix a typo in comment ("SPARC). * ChangeLog: Likewise. * os_dep.c (GC_linux_main_stack_base): Likewise. * include/private/gcconfig.h: Fix a typo in comment ("release"). * mallocx.c (GC_generic_malloc_many): Fix a typo in comment ("reacquiring"). * mallocx.c (GC_memalign): Fix a typo in comment ("OK"). * os_dep.c (GC_win32_free_heap): Likewise. * pthread_support.c (GC_remove_all_threads_but_me): Likewise. * win32_threads.c (GC_remove_all_threads_but_me): Likewise. * doc/README.Mac: Likewise. * mark.c (GC_push_unconditionally): Fix a typo in comment ("pointers"). * pthread_support.c: Fix a typo in comment ("which"). * win32_threads.c: Fix a typo in comment ("losing").
* Update AUTHORS fileIvan Maidanski2013-07-21
|
* Fix 'stack section' pointer passed to push_all_stack_sections (Pthreads)Ivan Maidanski2013-07-20
| | | | | | | | * pthread_stop_world.c (GC_push_all_stacks): Use traced_stack_sect->prev instead of traced_stack_sect if saved_stack_ptr (of traced_stack_sect) is the same as stop_info.stack_ptr of the examined thread (thus preventing assertion violation in GC_push_all_stack_sections invoked during incremental collection).
* Fix stackbottom/stack_end assignment in GC_call_with_gc_activeIvan Maidanski2013-07-20
| | | | | | | | | * misc.c (GC_call_with_gc_active): Add GC_noop1 call between "fn" call and "return" statement to discourage the compiler from treating the function call as a tail one (thus ensuring "stackbottom" COOLER_THAN any stack pointer value obtained inside "fn"). * pthread_support.c (GC_call_with_gc_active): Likewise. * win32_threads.c (GC_call_with_gc_active): Likewise.
* TODO file: Add pending TODO/FIXME itemsIvan Maidanski2013-07-20
|
* Fix assertion violation in GC_mark_from prefetch loopIvan Maidanski2013-07-17
| | | | | | | * mark.c (GC_mark_from): If "descr" is less than size of word then skip prefetching and PUSH_CONTENTS of the current entry (thus, eliminate assertion violation in the prefetch loop) if SMALL_CONFIG is not defined.
* Eliminate GC_first_nonempty atomic value reload in GC_mark_local assertionIvan Maidanski2013-07-16
| | | | | | | * mark.c (GC_mark_from, GC_mark_local, GC_do_parallel_mark): Reformat code partially. * mark.c (GC_mark_local): Use "my_first_nonempty" in assertion instead of reloading value of GC_first_nonempty twice.
* Fix typo in comment of GC_mark_fromIvan Maidanski2013-07-16
| | | | * mark.c (GC_mark_from): Fix typo (capitalization) in comment ("ASAP").
* Allow to compile GC_inner_start_routine aside from extra/gc.cIvan Maidanski2013-07-16
| | | | | | | | | | | | | | | | | | | | | (for proper exceptions support on Linux) * extra/gc.c: Do not include pthread_start.c if GC_PTHREAD_START_STANDALONE defined (thus pthread_start.c could go to a standalone compilation unit). * include/private/pthread_support.h (GC_INNER_PTHRSTART): New macro (defined to either empty or GC_INNER depending on GC_PTHREAD_START_STANDALONE). * include/private/pthread_support.h (GC_start_rtn_prepare_thread, GC_thread_exit_proc): Replace GC_INNER to GC_INNER_PTHRSTART. * pthread_support.c (GC_thread_exit_proc, GC_start_rtn_prepare_thread): Likewise. * pthread_start.c (GC_inner_start_routine): Define as GC_INNER_PTHRSTART; do not call GC_log_printf if GC_PTHREAD_START_STANDALONE (since the function might be visible only within extra/gc.c compilation unit). * pthread_support.c (GC_inner_start_routine): Declare as GC_INNER_PTHRSTART.
* Test NO_WRAP_MARK_SOME macro to suppress WRAP_MARK_SOME-specific codeIvan Maidanski2013-07-15
| | | | * mark.c (WRAP_MARK_SOME): Do not define if NO_WRAP_MARK_SOME defined.
* Define [UN]SET_LOCK_HOLDER and I_[DONT_]HOLD_LOCK macros only if usedIvan Maidanski2013-07-15
| | | | | | | | | (code refactoring) * include/private/gc_locks.h (SET_LOCK_HOLDER, UNSET_LOCK_HOLDER, I_HOLD_LOCK, I_DONT_HOLD_LOCK): Do not define unless GC_ASSERTIONS. * include/private/gc_locks.h (SET_LOCK_HOLDER, UNSET_LOCK_HOLDER): Do not define unless THREADS.
* Do not set GC_lock_holder by call_with_alloc_lock if assertions disabledIvan Maidanski2013-07-15
| | | | | | | | | | | | * include/private/gc_locks.h (GC_lock_holder): Do not declare unless GC_ASSERTIONS (the variable is not longer used to prevent recursive reentry in the system call wrapper). * misc.c (GC_call_with_alloc_lock): Remove [UN]SET_LOCK_HOLDER explicit calls since GC_lock_holder is set properly by [UN]LOCK() (in case of GC_ASSERTIONS). * pthread_support.c (GC_lock_holder): Do not define unless GC_ASSERTIONS; adjust comment. * win32_threads.c (GC_lock_holder): Likewise.
* Define SET/UNSET_MARK_LOCK_HOLDER macros to set/check GC_acquire_mark_lockIvan Maidanski2013-07-15
| | | | | | | | | | | | | | | | | | (refactoring) * pthread_support.c (SET_MARK_LOCK_HOLDER, UNSET_MARK_LOCK_HOLDER): New macro (defined to no action unless GC_ASSERTIONS). * win32_threads.c (SET_MARK_LOCK_HOLDER, UNSET_MARK_LOCK_HOLDER): Likewise. * pthread_support.c (GC_acquire_mark_lock, GC_release_mark_lock, GC_wait_builder, GC_wait_marker): Use [UN]SET_MARK_LOCK_HOLDER (instead of GC_mark_lock_holder setters and checkers). * win32_threads.c (GC_acquire_mark_lock, GC_release_mark_lock, GC_wait_builder, GC_wait_marker): Likewise. * win32_threads.c (GC_mark_lock_holder): Change type to DWORD unless GC_PTHREADS_PARAMARK defined. * win32_threads.c (GC_acquire_mark_lock, GC_notify_all_builder): Remove unnecessary cast of GetCurrentThreadId() result.
* Add double-lock assertion to GC_acquire_mark_lockIvan Maidanski2013-07-15
| | | | | | | * pthread_support.c (GC_acquire_mark_lock): Add assertion that GC_mark_lock_holder is not set to the current thread on the function entry (i.e., assertion against double lock). * win32_threads.c (GC_acquire_mark_lock): Likewise.
* Mark GC_started_thread_while_stopped() as GC_INNERIvan Maidanski2013-07-15
| | | | | | * mark.c (GC_started_thread_while_stopped): Declare as GC_INNER (declared only if GC_WIN32_THREADS). * win32_threads.c (GC_started_thread_while_stopped): Define as GC_INNER.
* Make GC_mark_lock_holder variable staticIvan Maidanski2013-07-15
| | | | | | | * include/private/gc_locks.h (GC_mark_lock_holder): Remove declaration. * pthread_support.c (GC_mark_lock_holder): Change from GC_INNER to STATIC (defined only if GC_ASSERTIONS). * win32_threads.c (GC_mark_lock_holder): Likewise.
* Add assertion to LOCK definition that lock is not already heldIvan Maidanski2013-07-15
| | | | | * include/private/gc_locks.h (UNCOND_LOCK): Add assertion that I_DONT_HOLD_LOCK (lock is not held precondition).
* Fix GC_PTHREAD_PTRVAL definition for GC_PTHREADS_PARAMARK (Win32)Ivan Maidanski2013-07-15
| | | | | * win32_threads.c (GC_PTHREAD_PTRVAL): Define also if GC_PTHREADS_PARAMARK (even w/o GC_WIN32_PTHREADS).
* Enable thread-local allocation support for Clang on CygwinIvan Maidanski2013-07-11
| | | | | | * include/private/thread_local_alloc.h (USE_PTHREAD_SPECIFIC): Use (instead of USE_COMPILER_TLS) for clang3.1/x86 cygwin to workaround "thread-local storage is unsupported for the current target" error.
* Fix more typos in comments and documentationIvan Maidanski2013-07-11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * alloc.c: Fix typo ("overflow"). * configure.ac: Fix typo ("optimization"). * doc/README.amiga: Fix typos ("also", "specific", "unnecessary"). * doc/README.cords: Fix typos ("descendants", "highlighted"). * ChangeLog: Fix typos ("[un]collectible"). * README.md: Likewise. * dbg_mlc.c: Likewise. * doc/README.hp: Likewise. * doc/README.linux: Likewise. * doc/gcdescr.html: Likewise. * doc/gcinterface.html: Likewise. * include/gc_mark.h: Likewise. * include/gc_pthread_redirects.h: Likewise. * include/new_gc_alloc.h: Likewise. * include/private/dbg_mlc.h: Likewise. * include/private/gc_pmark.h: Likewise. * include/private/gc_priv.h: Likewise. * new_hblk.c: Likewise. * ChangeLog: Fix typo ("multi-threaded"). * cord/cordxtra.c: Likewise. * doc/debugging.html: Likewise. * doc/gcinterface.html: Likewise. * doc/leak.html: Likewise. * doc/overview.html: Likewise. * doc/simple_example.html: Likewise. * include/gc_mark.h: Likewise. * include/private/gc_priv.h: Likewise. * os_dep.c: Likewise. * ptr_chck.c: Likewise. * README.md: Fix typo ("pointer-free"). * allchblk.c: Likewise. * doc/debugging.html: Likewise. * doc/gcdescr.html: Likewise.
* Update AUTHORS fileIvan Maidanski2013-07-11
|
* Fix typos in commentsOndrej Bilka2013-07-11
| | | | | | | | | | | | | | | | | | | | | | | | * blacklst.c: Fix typo ("even though"). * cord/cordbscs.c: Fix typo ("exponentially"). * cord/cordxtra.c: Fix typo ("represented"). * dyn_load.c: Fix typos ("uncollectible", "occurred"). * extra/AmigaOS: Fix typos ("specific", "necessary", "always", "effectiveness"). * finalize.c: Fix typo ("descendants"). * include/cord.h: Fix typo ("idiosyncrasies"). * include/gc.h: Fix typo ("collectible"). * include/gc_allocator.h: Fix typos ("allocator", "[un]collectible"). * mach_dep.c: Fix typo ("erroneously"). * malloc.c: Fix typos ("[un]collectible", "pointer-free", "initialization"). * mallocx.c: Fix typos ("largely", "pointer-free", "uncollectible"). * mark.c: Fix typos ("[un]collectible", "even though"). * misc.c: Fix typo ("erroneously"). * os_dep.c: Fix typos ("non-addressable", "happening", "pointer-free"). * tests/test.c: Fix typos ("uncollectible", "reversed"). * tests/test_cpp.cc: Fix typos ("[un]collectible"). * typd_mlc.c: Fix typo ("copyright"). * win32_threads.c: Fix typos ("optimization", "uncollectible").
* Expand tabs to spaces in rarely used (ancient) filesIvan Maidanski2013-07-10
| | | | | | | | | * extra/AmigaOS.c: Expand tabs to spaces. * extra/MacOS.c: Likewise. * extra/Mac_files/dataend.c: Likewise. * extra/Mac_files/datastart.c: Likewise. * extra/symbian.cpp: Likewise. * cord/cordxtra.c: Likewise.
* Fix missing tabs in SMakefile.amigaIvan Maidanski2013-07-10
| | | | | * SMakefile.amiga (clean, test, gctest, setjmp_t, gc*.lib, setjmp_t): Fix indentation (replace spaces with tabs).
* Check that SIG_SUSPEND and SIG_THR_RESTART are different (Pthreads)Ivan Maidanski2013-07-10
| | | | | * pthread_stop_world.c (GC_stop_init): Add a check that GC_sig_suspend value differs from that of GC_sig_thr_restart (abort otherwise).
* Improve debug-only messages of add/remove_roots and init_linux_data_startIvan Maidanski2013-06-12
| | | | | | | * mark_rts.c (GC_add_roots_inner, GC_remove_root_at_pos): Log r_tmp value (only if DEBUG_ADD_DEL_ROOTS). * os_dep.c (GC_init_linux_data_start): Log unresolved [__]data_start symbol (only if DEBUG_ADD_DEL_ROOTS and LINUX).
* Fix typo in comment of signalObjectAndWait_func (Win32)Ivan Maidanski2013-06-12
| | | | * win32_threads.c (signalObjectAndWait_func): Fix a typo in comment.
* Use compiler TLS for Android NDK gcc/armIvan Maidanski2013-06-10
| | | | | * include/private/thread_local_alloc.h (USE_COMPILER_TLS): Define for Android NDK gcc/arm v4.6 or higher.
* Workaround 'unresolved __tls_get_addr' error for Android NDK Clang/x86Ivan Maidanski2013-06-10
| | | | | | * include/private/thread_local_alloc.h (USE_COMPILER_TLS): Do not use for Android NDK Clang (to workaround "unresolved __tls_get_addr" linker error reported both by clang/x86 and clang/mips).
* Tag GC malloc routines with alloc_size attribute for Clang 3.2+Ivan Maidanski2013-06-10
| | | | | * include/gc_config_macros.h (GC_ATTR_ALLOC_SIZE): Define as alloc_size attribute for Clang 3.2+ as well.
* Workaround 'unresolved __tls_get_addr' error for Android NDK clang/mipsIvan Maidanski2013-06-09
| | | | | | * include/private/thread_local_alloc.h (USE_COMPILER_TLS): Do not use for Android NDK Clang/mips (to workaround "unresolved __tls_get_addr" linker error).
* Use pthread API to operate thread-local data on Linux if no compiler TLSIvan Maidanski2013-06-09
| | | | | | * include/private/thread_local_alloc.h (USE_PTHREAD_SPECIFIC): Define for GC_LINUX_THREADS (instead of default USE_CUSTOM_SPECIFIC) if compiler TLS is unavailable (e.g., for linux/arm).
* Move GC_OPENBSD_UTHREADS definition to private/gcconfig.h (OpenBSD)Ivan Maidanski2013-06-08
| | | | | * include/gc_config_macros.h (GC_OPENBSD_UTHREADS): Move definition to gcconfig.h (i.e., do not export to client code).
* Suppress 'GC_dont_gc deprecated' warning in gc.h if GC_DONT_GCIvan Maidanski2013-06-08
| | | | | | * include/gc.h (GC_dont_gc): Do not specify GC_ATTR_DEPRECATED if GC_DONT_GC defined (to avoid deprecated warning in GC_INIT_CONF_MAX_RETRIES which assigns GC_dont_gc directly).
* Support rthreads introduced in OpenBSD 5.2+Kurt Miller2013-06-08
| | | | | | | | | | | | | | * include/gc_config_macros.h (GC_OPENBSD_UTHREADS): New macro (defined only if OpenBSD prior to 5.2 release and threads). * include/private/gc_priv.h (SIG_SUSPEND): Define for OpenBSD (unless GC_OPENBSD_UTHREADS). * include/private/pthread_stop_world.h (thread_stop_info): Test GC_OPENBSD_UTHREADS macro instead of GC_OPENBSD_THREADS. * misc.c (GC_set_suspend_signal, GC_set_thr_restart_signal, GC_get_suspend_signal, GC_get_thr_restart_signal): Likewise. * os_dep.c (GC_dirty_init): Likewise. * pthread_stop_world.c: Likewise. * tests/initsecondarythread.c (main): Likewise.
* Remove unused UTHREAD_SP_OFFSET macro (OpenBSD)Ivan Maidanski2013-06-08
| | | | | | * include/private/gcconfig.h (UTHREAD_SP_OFFSET): Do not define (since no longer used for OpenBSD because pthread_stackseg_np is used to get thread stack pointer).
* Update AUTHORS fileIvan Maidanski2013-06-02
|
* Register dynamic libraries via dl_iterate_phdr on OpenBSDKurt Miller2013-06-02
| | | | | * dyn_load.c (HAVE_DL_ITERATE_PHDR): Define for OpenBSD (with release date 2005.19 or later).
* Register dynamic libraries via dl_iterate_phdr on Android if possibleIvan Maidanski2013-06-01
| | | | | | * dyn_load.c (HAVE_DL_ITERATE_PHDR): Define also for Android. * dyn_load.c (dl_iterate_phdr): Declare explicitly for Android (since no prototype in NDK link.h for ARM).
* Fix GC_INIT_CONF_ROOTS in gc.h for Android (define __data_start as weak)Ivan Maidanski2013-06-01
| | | | | | * include/gc.h (GC_INIT_CONF_ROOTS): Define __data_start as weak symbol for Android (including x86 and MIPS targets); do not call GC_add_roots if __data_start symbol is unresolved.
* Default to use libc_stack_end in single-threaded GC on glibc targetsLudovic Courtes2013-05-22
| | | | | * include/private/gcconfig.h (USE_LIBC_PRIVATES): Define for glibc (unless DONT_USE_LIBC_PRIVATES is defined).
* Adjust README.md title and references to doc .html files in itIvan Maidanski2013-05-18
|
* Adjust README filename in README.QUICKIvan Maidanski2013-05-18
|
* Convert readme to markdown.David Terei2013-05-10
|
* Adjust build scripts to enable additional test library in staticrootstestIvan Maidanski2013-05-05
| | | | | | | | | | | | | | (The 2nd test library contains global data too but has no GC_INIT call.) * tests/tests.am (staticrootstest_CFLAGS, libstaticrootslib2_test_la_CFLAGS): New definition (to test with libsrl_getpelem2() enabled). * tests/tests.am (staticrootstest_LDADD, check_LTLIBRARIES): Add libstaticrootslib2_test.la. * tests/tests.am (libstaticrootslib2_test_la_SOURCES, libstaticrootslib2_test_la_LIBADD, libstaticrootslib2_test_la_LDFLAGS): New definition (similar to that of libstaticrootslib_test_la_X).
* Improve staticrootstest: add global data to library, add lib w/o GC_INITIvan Maidanski2013-05-05
| | | | | | | | | | | | | | | | | | * tests/staticrootslib.c: Do not include stdio.h (not needed). * tests/staticrootslib.c (root, root_nz): New static variables. * tests/staticrootstest.c (root_nz): Likewise. * tests/staticrootslib.c (libsrl_getpelem): New exported function (exported as "libsrl_getpelem2" if STATICROOTSLIB2). * tests/staticrootslib.c (libsrl_mktree, libsrl_init): Do not define if STATICROOTSLIB2. * tests/staticrootslib.c (libsrl_init): Do not call GC_INIT if STATICROOTSLIB_INIT_IN_MAIN defined. * tests/staticrootstest.c (libsrl_getpelem, libsrl_getpelem2): Declare imported function. * tests/staticrootstest.c (main): Call GC_INIT if STATICROOTSLIB_INIT_IN_MAIN defined; set *libsrl_getpelem2() (only if STATICROOTSLIB2 defined), *libsrl_getpelem() and root_nz[] elements (similar to that of root[]).
* Enable staticrootstest for the case of GC shared library buildIvan Maidanski2013-05-04
| | | | | | | | | | | | | | | | | | | | * tests/staticrootslib.c (GC_TEST_EXPORT_API): New macro (defined to set GCC default visibility attribute if GC_VISIBILITY_HIDDEN_SET unless Win32). * tests/staticrootslib.c (root): Remove unused global variable. * tests/staticrootslib.c (libsrl_mktree, libsrl_init): Decorate with GC_TEST_EXPORT_API. * tests/staticrootstest.c (GC_VISIBILITY_HIDDEN_SET): Do not check (do not skip the test). * tests/staticrootstest.c (GC_TEST_IMPORT_API): New macro. * tests/staticrootstest.c (root): Explicitly specify zero initializer. * tests/staticrootstest.c (libsrl_mktree, libsrl_init): Decorate with GC_TEST_IMPORT_API. * tests/staticrootstest.c (mktree, main): Remove commented out code. * tests/staticrootstest.c (main): Avoid code duplication. * tests/tests.am (staticrootstest_LDADD, check_LTLIBRARIES, libstaticrootslib_la): Rename libstaticrootslib to libstaticrootslib_test.