aboutsummaryrefslogtreecommitdiff
path: root/boehm-gc/misc.c
diff options
context:
space:
mode:
authorTom Tromey <tromey@redhat.com>2001-08-18 01:04:43 +0000
committerTom Tromey <tromey@gcc.gnu.org>2001-08-18 01:04:43 +0000
commit5a2586cf8fcf001cddb47d3f9bf6610975d1564d (patch)
tree0a038d94cc4acd44c0926f011247f6b7969fa84b /boehm-gc/misc.c
parenteed566698034311c58eea585da1ddb5a6e0807fb (diff)
downloadgcc-5a2586cf8fcf001cddb47d3f9bf6610975d1564d.zip
gcc-5a2586cf8fcf001cddb47d3f9bf6610975d1564d.tar.gz
gcc-5a2586cf8fcf001cddb47d3f9bf6610975d1564d.tar.bz2
Makefile.am, [...]: Imported GC 6.0 and merged local changes.
* Makefile.am, acinclude.m4, configure.in: Imported GC 6.0 and merged local changes. From-SVN: r44994
Diffstat (limited to 'boehm-gc/misc.c')
-rw-r--r--boehm-gc/misc.c19
1 files changed, 15 insertions, 4 deletions
diff --git a/boehm-gc/misc.c b/boehm-gc/misc.c
index 8ece80d..94ef15d 100644
--- a/boehm-gc/misc.c
+++ b/boehm-gc/misc.c
@@ -45,7 +45,7 @@
mutex_t GC_allocate_ml; /* Implicitly initialized. */
# else
# ifdef WIN32_THREADS
-# if defined(_DLL) || defined(GC_DLL)
+# if !defined(GC_NOT_DLL) && (defined(_DLL) || defined(GC_DLL))
__declspec(dllexport) CRITICAL_SECTION GC_allocate_ml;
# else
CRITICAL_SECTION GC_allocate_ml;
@@ -301,6 +301,8 @@ ptr_t arg;
if (++random_no % 13 == 0) {
limit = sp;
MAKE_HOTTER(limit, BIG_CLEAR_SIZE*sizeof(word));
+ limit &= ~0xf; /* Make it sufficiently aligned for assembly */
+ /* implementations of GC_clear_stack_inner. */
return GC_clear_stack_inner(arg, limit);
} else {
BZERO(dummy, SMALL_CLEAR_SIZE*sizeof(word));
@@ -441,6 +443,15 @@ void GC_init()
UNLOCK();
ENABLE_SIGNALS();
+# if defined(PARALLEL_MARK) || defined(THREAD_LOCAL_ALLOC)
+ /* Make sure marker threads and started and thread local */
+ /* allocation is initialized, in case we didn't get */
+ /* called from GC_init_parallel(); */
+ {
+ extern void GC_init_parallel(void);
+ GC_init_parallel();
+ }
+# endif /* PARALLEL_MARK || THREAD_LOCAL_ALLOC */
}
#if defined(MSWIN32) || defined(MSWINCE)
@@ -682,7 +693,7 @@ out:
}
int GC_write(buf, len)
- char * buf;
+ GC_CONST char * buf;
size_t len;
{
BOOL tmp;
@@ -735,7 +746,7 @@ int GC_tmp; /* Should really be local ... */
#if !defined(MSWIN32) && !defined(MSWINCE) && !defined(OS2) && !defined(MACOS)
int GC_write(fd, buf, len)
int fd;
-char *buf;
+GC_CONST char *buf;
size_t len;
{
register int bytes_written = 0;
@@ -867,7 +878,7 @@ GC_CONST char * msg;
/* It's arguably nicer to sleep, but that makes it harder */
/* to look at the thread if the debugger doesn't know much */
/* about threads. */
- for(;;);
+ for(;;) {}
}
# ifdef MSWIN32
DebugBreak();