aboutsummaryrefslogtreecommitdiff
path: root/boehm-gc/misc.c
diff options
context:
space:
mode:
authorBryce McKinlay <bryce@gcc.gnu.org>2000-04-19 11:10:01 +0100
committerBryce McKinlay <bryce@gcc.gnu.org>2000-04-19 11:10:01 +0100
commit93002327db5e5f466de60dc3f8c876cf9a56e183 (patch)
treefec69f60b37ca7ee4a47582f914dabbc7b3ee0c4 /boehm-gc/misc.c
parent5e787f078df8900b34981443e9f968fd5c3b039c (diff)
downloadgcc-93002327db5e5f466de60dc3f8c876cf9a56e183.zip
gcc-93002327db5e5f466de60dc3f8c876cf9a56e183.tar.gz
gcc-93002327db5e5f466de60dc3f8c876cf9a56e183.tar.bz2
Imported version version 5.0alpha6.
* acinclude.m4: Bump version to 5.0a6. * configure.in: Don't use alpha_mach_dep.s. * include/private/config.h, irix_threads.c gc_watcom.asm: Delete obsolete files. From-SVN: r33251
Diffstat (limited to 'boehm-gc/misc.c')
-rw-r--r--boehm-gc/misc.c21
1 files changed, 17 insertions, 4 deletions
diff --git a/boehm-gc/misc.c b/boehm-gc/misc.c
index 60505af..dd42961 100644
--- a/boehm-gc/misc.c
+++ b/boehm-gc/misc.c
@@ -42,11 +42,12 @@
# ifdef WIN32_THREADS
GC_API CRITICAL_SECTION GC_allocate_ml;
# else
-# if defined(IRIX_THREADS) || defined(LINUX_THREADS) \
- || defined(IRIX_JDK_THREADS)
+# if defined(IRIX_THREADS) || defined(IRIX_JDK_THREADS) \
+ || (defined(LINUX_THREADS) && defined(USE_SPIN_LOCK))
pthread_t GC_lock_holder = NO_THREAD;
# else
-# if defined(HPUX_THREADS)
+# if defined(HPUX_THREADS) \
+ || defined(LINUX_THREADS) && !defined(USE_SPIN_LOCK)
pthread_mutex_t GC_allocate_ml = PTHREAD_MUTEX_INITIALIZER;
# else
--> declare allocator lock here
@@ -123,6 +124,15 @@ extern signed_word GC_mem_found;
for (i = 8*sizeof(word) + 1; i <= 16 * sizeof(word); i++) {
GC_size_map[i] = (ROUNDED_UP_WORDS(i) + 1) & (~1);
}
+# ifdef GC_GCJ_SUPPORT
+ /* Make all sizes up to 32 words predictable, so that a */
+ /* compiler can statically perform the same computation, */
+ /* or at least a computation that results in similar size */
+ /* classes. */
+ for (i = 16*sizeof(word) + 1; i <= 32 * sizeof(word); i++) {
+ GC_size_map[i] = (ROUNDED_UP_WORDS(i) + 3) & (~3);
+ }
+# endif
/* We leave the rest of the array to be filled in on demand. */
}
@@ -443,7 +453,8 @@ void GC_init_inner()
# ifdef MSWIN32
GC_init_win32();
# endif
-# if defined(LINUX) && (defined(SPARC) || defined(IA64))
+# if defined(SEARCH_FOR_DATA_START)
+ /* This doesn't really work if the collector is in a shared library. */
GC_init_linux_data_start();
# endif
# ifdef SOLARIS_THREADS
@@ -819,6 +830,8 @@ struct callinfo info[NFRAMES];
#endif /* SAVE_CALL_CHAIN */
+/* Needed by SRC_M3, gcj, and should perhaps be the official interface */
+/* to GC_dont_gc. */
void GC_enable()
{
GC_dont_gc--;