aboutsummaryrefslogtreecommitdiff
path: root/boehm-gc/misc.c
diff options
context:
space:
mode:
authorBryce McKinlay <bryce@waitaki.otago.ac.nz>2001-10-16 09:01:40 +0000
committerBryce McKinlay <bryce@gcc.gnu.org>2001-10-16 10:01:40 +0100
commit4c7726b172c35bd078bb0f88025670ffddd94a92 (patch)
tree483dc5098530e605b23e445c94fcdfdfec0d9b23 /boehm-gc/misc.c
parent107abb2f61f6e53ebb7aa05b78fdd9234ee7877c (diff)
downloadgcc-4c7726b172c35bd078bb0f88025670ffddd94a92.zip
gcc-4c7726b172c35bd078bb0f88025670ffddd94a92.tar.gz
gcc-4c7726b172c35bd078bb0f88025670ffddd94a92.tar.bz2
Makefile.am, [...]: Imported GC 6.1 Alpha 1 and merged local changes.
* Makefile.am, acinclude.m4, configure.in: Imported GC 6.1 Alpha 1 and merged local changes. From-SVN: r46283
Diffstat (limited to 'boehm-gc/misc.c')
-rw-r--r--boehm-gc/misc.c36
1 files changed, 16 insertions, 20 deletions
diff --git a/boehm-gc/misc.c b/boehm-gc/misc.c
index 94ef15d..2bb93f3 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