aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRainer Orth <ro@TechFak.Uni-Bielefeld.DE>1999-08-17 22:42:27 +0000
committerTom Tromey <tromey@cygnus.com>1999-08-17 22:42:27 +0000
commitccb5c396bc832748913989434f840bd90583ca86 (patch)
tree9e78928add0df041f74e51f29edbe10e49e1a31f
parentf50bf0e32f8b801e1b173e721e76d0e1742c551b (diff)
Tue Aug 10 00:08:29 1999 Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
* gc_priv.h: Merged IRIX thread changes from include/private/gc_priv.h. git-svn-id: https://gcc.gnu.org/svn/gcc/branches/libgcj-2_95-branch@28739 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r--boehm-gc/ChangeLog5
-rw-r--r--boehm-gc/gc_priv.h25
2 files changed, 22 insertions, 8 deletions
diff --git a/boehm-gc/ChangeLog b/boehm-gc/ChangeLog
index 6b995afaaa6..3c470c3e61e 100644
--- a/boehm-gc/ChangeLog
+++ b/boehm-gc/ChangeLog
@@ -1,3 +1,8 @@
+Tue Aug 10 00:08:29 1999 Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
+
+ * gc_priv.h: Merged IRIX thread changes from
+ include/private/gc_priv.h.
+
1999-08-04 Tom Tromey <tromey@cygnus.com>
* configure.in: Added missing `;;'. From Anthony Green.
diff --git a/boehm-gc/gc_priv.h b/boehm-gc/gc_priv.h
index cc8b1476ddc..53d580fed73 100644
--- a/boehm-gc/gc_priv.h
+++ b/boehm-gc/gc_priv.h
@@ -497,14 +497,15 @@ void GC_print_callers (/* struct callinfo info[NFRAMES] */);
}
# define EXIT_GC() GC_collecting = 0;
# endif /* LINUX_THREADS */
-# ifdef IRIX_THREADS
+# if defined(IRIX_THREADS) || defined(IRIX_JDK_THREADS)
# include <pthread.h>
# include <mutex.h>
-# if __mips < 3 || !(defined (_ABIN32) || defined(_ABI64))
+# if __mips < 3 || !(defined (_ABIN32) || defined(_ABI64)) \
+ || !defined(_COMPILER_VERSION) || _COMPILER_VERSION < 700
# define GC_test_and_set(addr, v) test_and_set(addr,v)
# else
-# define GC_test_and_set(addr, v) __test_and_set(addr,v)
+# define GC_test_and_set(addr, v) __test_and_set(addr,v)
# endif
extern unsigned long GC_allocate_lock;
/* This is not a mutex because mutexes that obey the (optional) */
@@ -523,10 +524,17 @@ void GC_print_callers (/* struct callinfo info[NFRAMES] */);
# define UNLOCK() pthread_mutex_unlock(&GC_allocate_ml)
# else
# define LOCK() { if (GC_test_and_set(&GC_allocate_lock, 1)) GC_lock(); }
-# if __mips >= 3 && (defined (_ABIN32) || defined(_ABI64))
+# if __mips >= 3 && (defined (_ABIN32) || defined(_ABI64)) \
+ && defined(_COMPILER_VERSION) && _COMPILER_VERSION >= 700
# define UNLOCK() __lock_release(&GC_allocate_lock)
# else
-# define UNLOCK() GC_allocate_lock = 0
+ /* The function call in the following should prevent the */
+ /* compiler from moving assignments to below the UNLOCK. */
+ /* This is probably not necessary for ucode or gcc 2.8. */
+ /* It may be necessary for Ragnarok and future gcc */
+ /* versions. */
+# define UNLOCK() { GC_noop1(&GC_allocate_lock); \
+ *(volatile unsigned long *)(&GC_allocate_lock) = 0; }
# endif
# endif
extern GC_bool GC_collecting;
@@ -535,7 +543,7 @@ void GC_print_callers (/* struct callinfo info[NFRAMES] */);
GC_collecting = 1; \
}
# define EXIT_GC() GC_collecting = 0;
-# endif /* IRIX_THREADS */
+# endif /* IRIX_THREADS || IRIX_JDK_THREADS */
# ifdef WIN32_THREADS
# include <windows.h>
GC_API CRITICAL_SECTION GC_allocate_ml;
@@ -593,7 +601,7 @@ void GC_print_callers (/* struct callinfo info[NFRAMES] */);
# if defined(SRC_M3) || defined(AMIGA) || defined(SOLARIS_THREADS) \
|| defined(MSWIN32) || defined(MACOS) || defined(DJGPP) \
|| defined(NO_SIGNALS) || defined(IRIX_THREADS) \
- || defined(LINUX_THREADS)
+ || defined(IRIX_JDK_THREADS) || defined(LINUX_THREADS)
/* Also useful for debugging. */
/* Should probably use thr_sigsetmask for SOLARIS_THREADS. */
# define DISABLE_SIGNALS()
@@ -621,7 +629,8 @@ void GC_print_callers (/* struct callinfo info[NFRAMES] */);
PCR_waitForever);
# else
# if defined(SOLARIS_THREADS) || defined(WIN32_THREADS) \
- || defined(IRIX_THREADS) || defined(LINUX_THREADS)
+ || defined(IRIX_THREADS) || defined(LINUX_THREADS) \
+ || defined(IRIX_JDK_THREADS)
void GC_stop_world();
void GC_start_world();
# define STOP_WORLD() GC_stop_world()