summaryrefslogtreecommitdiff
path: root/boehm-gc/irix_threads.c
diff options
context:
space:
mode:
authorbryce <bryce@138bc75d-0d04-0410-961f-82ee72b054a4>2002-02-12 04:37:57 +0000
committerbryce <bryce@138bc75d-0d04-0410-961f-82ee72b054a4>2002-02-12 04:37:57 +0000
commit0cc01484c3f8c9ec4fec760501aec318bc199adf (patch)
treecef3197531d988920cbff060bdc10742baf06d01 /boehm-gc/irix_threads.c
parentb6c37935d39c0aadd3d6eefb9e09c455c6cbd0a5 (diff)
downloadgcc-0cc01484c3f8c9ec4fec760501aec318bc199adf.tar.gz
Imported GC 6.1 Alpha 3. Finally.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@49698 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'boehm-gc/irix_threads.c')
-rw-r--r--boehm-gc/irix_threads.c15
1 files changed, 6 insertions, 9 deletions
diff --git a/boehm-gc/irix_threads.c b/boehm-gc/irix_threads.c
index c894a31006d..12204fdabc2 100644
--- a/boehm-gc/irix_threads.c
+++ b/boehm-gc/irix_threads.c
@@ -141,8 +141,6 @@ GC_bool GC_thr_initialized = FALSE;
size_t GC_min_stack_sz;
-size_t GC_page_sz;
-
# define N_FREE_LISTS 25
ptr_t GC_stack_free_lists[N_FREE_LISTS] = { 0 };
/* GC_stack_free_lists[i] is free list for stacks of */
@@ -171,14 +169,14 @@ ptr_t GC_stack_alloc(size_t * stack_size)
if (result != 0) {
GC_stack_free_lists[index] = *(ptr_t *)result;
} else {
- result = (ptr_t) GC_scratch_alloc(search_sz + 2*GC_page_sz);
- result = (ptr_t)(((word)result + GC_page_sz) & ~(GC_page_sz - 1));
+ result = (ptr_t) GC_scratch_alloc(search_sz + 2*GC_page_size);
+ result = (ptr_t)(((word)result + GC_page_size) & ~(GC_page_size - 1));
/* Protect hottest page to detect overflow. */
# ifdef STACK_GROWS_UP
- /* mprotect(result + search_sz, GC_page_sz, PROT_NONE); */
+ /* mprotect(result + search_sz, GC_page_size, PROT_NONE); */
# else
- /* mprotect(result, GC_page_sz, PROT_NONE); */
- result += GC_page_sz;
+ /* mprotect(result, GC_page_size, PROT_NONE); */
+ result += GC_page_size;
# endif
}
*stack_size = search_sz;
@@ -438,7 +436,6 @@ void GC_thr_init()
if (GC_thr_initialized) return;
GC_thr_initialized = TRUE;
GC_min_stack_sz = HBLKSIZE;
- GC_page_sz = sysconf(_SC_PAGESIZE);
(void) sigaction(SIG_SUSPEND, 0, &act);
if (act.sa_handler != SIG_DFL)
ABORT("Previously installed SIG_SUSPEND handler");
@@ -602,7 +599,7 @@ GC_pthread_create(pthread_t *new_thread,
si -> start_routine = start_routine;
si -> arg = arg;
LOCK();
- if (!GC_thr_initialized) GC_thr_init();
+ if (!GC_initialized) GC_init();
if (NULL == attr) {
stack = 0;
(void) pthread_attr_init(&new_attr);