diff options
author | tromey <tromey@138bc75d-0d04-0410-961f-82ee72b054a4> | 2001-08-18 01:04:43 +0000 |
---|---|---|
committer | tromey <tromey@138bc75d-0d04-0410-961f-82ee72b054a4> | 2001-08-18 01:04:43 +0000 |
commit | 8fee6c5ba203062646a84ef04770c79ba2be0a6a (patch) | |
tree | 0a038d94cc4acd44c0926f011247f6b7969fa84b /boehm-gc/misc.c | |
parent | 75ae025532a15d2842c5401959ef6775e3ebe550 (diff) | |
download | gcc-8fee6c5ba203062646a84ef04770c79ba2be0a6a.tar.gz |
* Makefile.am, acinclude.m4, configure.in: Imported GC 6.0 and
merged local changes.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@44994 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'boehm-gc/misc.c')
-rw-r--r-- | boehm-gc/misc.c | 19 |
1 files changed, 15 insertions, 4 deletions
diff --git a/boehm-gc/misc.c b/boehm-gc/misc.c index 8ece80d9154..94ef15d3c3f 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(); |