Skip to content
Snippets Groups Projects
Commit 9affc817 authored by tromey's avatar tromey
Browse files

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: svn+ssh://gcc.gnu.org/svn/gcc/trunk@28740 138bc75d-0d04-0410-961f-82ee72b054a4
parent 900f01f2
No related merge requests found
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.
Mon Aug 9 18:33:38 1999 Rainer Orth <ro@TechFak.Uni-Bielefeld.DE> Mon Aug 9 18:33:38 1999 Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
* Makefile.in: Rebuilt. * Makefile.in: Rebuilt.
......
...@@ -520,14 +520,15 @@ void GC_print_callers (/* struct callinfo info[NFRAMES] */); ...@@ -520,14 +520,15 @@ void GC_print_callers (/* struct callinfo info[NFRAMES] */);
} }
# define EXIT_GC() GC_collecting = 0; # define EXIT_GC() GC_collecting = 0;
# endif /* LINUX_THREADS */ # endif /* LINUX_THREADS */
# ifdef IRIX_THREADS # if defined(IRIX_THREADS) || defined(IRIX_JDK_THREADS)
# include <pthread.h> # include <pthread.h>
# include <mutex.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) # define GC_test_and_set(addr, v) test_and_set(addr,v)
# else # 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 # endif
extern unsigned long GC_allocate_lock; extern unsigned long GC_allocate_lock;
/* This is not a mutex because mutexes that obey the (optional) */ /* This is not a mutex because mutexes that obey the (optional) */
...@@ -546,10 +547,17 @@ void GC_print_callers (/* struct callinfo info[NFRAMES] */); ...@@ -546,10 +547,17 @@ void GC_print_callers (/* struct callinfo info[NFRAMES] */);
# define UNLOCK() pthread_mutex_unlock(&GC_allocate_ml) # define UNLOCK() pthread_mutex_unlock(&GC_allocate_ml)
# else # else
# define LOCK() { if (GC_test_and_set(&GC_allocate_lock, 1)) GC_lock(); } # 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) # define UNLOCK() __lock_release(&GC_allocate_lock)
# else # 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
# endif # endif
extern GC_bool GC_collecting; extern GC_bool GC_collecting;
...@@ -558,7 +566,7 @@ void GC_print_callers (/* struct callinfo info[NFRAMES] */); ...@@ -558,7 +566,7 @@ void GC_print_callers (/* struct callinfo info[NFRAMES] */);
GC_collecting = 1; \ GC_collecting = 1; \
} }
# define EXIT_GC() GC_collecting = 0; # define EXIT_GC() GC_collecting = 0;
# endif /* IRIX_THREADS */ # endif /* IRIX_THREADS || IRIX_JDK_THREADS */
# ifdef WIN32_THREADS # ifdef WIN32_THREADS
# include <windows.h> # include <windows.h>
GC_API CRITICAL_SECTION GC_allocate_ml; GC_API CRITICAL_SECTION GC_allocate_ml;
...@@ -616,7 +624,7 @@ void GC_print_callers (/* struct callinfo info[NFRAMES] */); ...@@ -616,7 +624,7 @@ void GC_print_callers (/* struct callinfo info[NFRAMES] */);
# if defined(SRC_M3) || defined(AMIGA) || defined(SOLARIS_THREADS) \ # if defined(SRC_M3) || defined(AMIGA) || defined(SOLARIS_THREADS) \
|| defined(MSWIN32) || defined(MACOS) || defined(DJGPP) \ || defined(MSWIN32) || defined(MACOS) || defined(DJGPP) \
|| defined(NO_SIGNALS) || defined(IRIX_THREADS) \ || defined(NO_SIGNALS) || defined(IRIX_THREADS) \
|| defined(LINUX_THREADS) || defined(IRIX_JDK_THREADS) || defined(LINUX_THREADS)
/* Also useful for debugging. */ /* Also useful for debugging. */
/* Should probably use thr_sigsetmask for SOLARIS_THREADS. */ /* Should probably use thr_sigsetmask for SOLARIS_THREADS. */
# define DISABLE_SIGNALS() # define DISABLE_SIGNALS()
...@@ -644,7 +652,8 @@ void GC_print_callers (/* struct callinfo info[NFRAMES] */); ...@@ -644,7 +652,8 @@ void GC_print_callers (/* struct callinfo info[NFRAMES] */);
PCR_waitForever); PCR_waitForever);
# else # else
# if defined(SOLARIS_THREADS) || defined(WIN32_THREADS) \ # 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_stop_world();
void GC_start_world(); void GC_start_world();
# define STOP_WORLD() GC_stop_world() # define STOP_WORLD() GC_stop_world()
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment