diff options
author | bryce <bryce@138bc75d-0d04-0410-961f-82ee72b054a4> | 2001-10-16 09:01:40 +0000 |
---|---|---|
committer | bryce <bryce@138bc75d-0d04-0410-961f-82ee72b054a4> | 2001-10-16 09:01:40 +0000 |
commit | fa4ee1f113cb5cb7452551cdd2a608656c06a45c (patch) | |
tree | 483dc5098530e605b23e445c94fcdfdfec0d9b23 /boehm-gc/misc.c | |
parent | 380cddab526fcf3c2f33dc8ebeb61c2d42703f41 (diff) | |
download | linaro-gcc-fa4ee1f113cb5cb7452551cdd2a608656c06a45c.tar.gz linaro-gcc-fa4ee1f113cb5cb7452551cdd2a608656c06a45c.tar.bz2 linaro-gcc-fa4ee1f113cb5cb7452551cdd2a608656c06a45c.zip |
* Makefile.am, acinclude.m4, configure.in: Imported GC 6.1 Alpha 1
and merged local changes.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@46283 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'boehm-gc/misc.c')
-rw-r--r-- | boehm-gc/misc.c | 36 |
1 files changed, 16 insertions, 20 deletions
diff --git a/boehm-gc/misc.c b/boehm-gc/misc.c index 94ef15d3c3f..2bb93f3dd57 100644 --- a/boehm-gc/misc.c +++ b/boehm-gc/misc.c @@ -22,7 +22,7 @@ #define I_HIDE_POINTERS /* To make GC_call_with_alloc_lock visible */ #include "private/gc_pmark.h" -#ifdef SOLARIS_THREADS +#ifdef GC_SOLARIS_THREADS # include <sys/syscall.h> #endif #if defined(MSWIN32) || defined(MSWINCE) @@ -41,29 +41,27 @@ /* Critical section counter is defined in the M3 runtime */ /* That's all we use. */ # else -# ifdef SOLARIS_THREADS +# ifdef GC_SOLARIS_THREADS mutex_t GC_allocate_ml; /* Implicitly initialized. */ # else -# ifdef WIN32_THREADS +# ifdef GC_WIN32_THREADS # if !defined(GC_NOT_DLL) && (defined(_DLL) || defined(GC_DLL)) __declspec(dllexport) CRITICAL_SECTION GC_allocate_ml; # else CRITICAL_SECTION GC_allocate_ml; # endif # else -# if defined(IRIX_THREADS) \ - || (defined(LINUX_THREADS) && defined(USE_SPIN_LOCK)) - pthread_t GC_lock_holder = NO_THREAD; -# else -# if defined(HPUX_THREADS) \ - || defined(LINUX_THREADS) && !defined(USE_SPIN_LOCK) +# if defined(GC_PTHREADS) && !defined(GC_SOLARIS_THREADS) +# if defined(USE_SPIN_LOCK) + pthread_t GC_lock_holder = NO_THREAD; +# else pthread_mutex_t GC_allocate_ml = PTHREAD_MUTEX_INITIALIZER; pthread_t GC_lock_holder = NO_THREAD; /* Used only for assertions, and to prevent */ /* recursive reentry in the system call wrapper. */ -# else +# endif +# else --> declare allocator lock here -# endif # endif # endif # endif @@ -524,20 +522,18 @@ void GC_init_inner() # if defined(SEARCH_FOR_DATA_START) GC_init_linux_data_start(); # endif -# if defined(NETBSD) && defined(__ELF__) +# if (defined(NETBSD) || defined(OPENBSD)) && defined(__ELF__) GC_init_netbsd_elf(); # endif -# if defined(IRIX_THREADS) || defined(LINUX_THREADS) \ - || defined(HPUX_THREADS) || defined(SOLARIS_THREADS) +# if defined(GC_PTHREADS) || defined(GC_SOLARIS_THREADS) GC_thr_init(); # endif -# ifdef SOLARIS_THREADS +# ifdef GC_SOLARIS_THREADS /* We need dirty bits in order to find live stack sections. */ GC_dirty_init(); # endif -# if !defined(THREADS) || defined(SOLARIS_THREADS) || defined(WIN32_THREADS) \ - || defined(IRIX_THREADS) || defined(LINUX_THREADS) \ - || defined(HPUX_THREADS) +# if !defined(THREADS) || defined(GC_PTHREADS) || defined(GC_WIN32_THREADS) \ + || defined(GC_SOLARIS_THREADS) if (GC_stackbottom == 0) { GC_stackbottom = GC_get_stack_base(); # if defined(LINUX) && defined(IA64) @@ -652,7 +648,7 @@ void GC_enable_incremental GC_PROTO(()) if (GC_is_win32s()) goto out; } # endif /* MSWIN32 */ -# ifndef SOLARIS_THREADS +# ifndef GC_SOLARIS_THREADS GC_dirty_init(); # endif if (!GC_is_initialized) { @@ -753,7 +749,7 @@ size_t len; register int result; while (bytes_written < len) { -# ifdef SOLARIS_THREADS +# ifdef GC_SOLARIS_THREADS result = syscall(SYS_write, fd, buf + bytes_written, len - bytes_written); # else |