1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-05-20 11:40:18 +02:00

Remove per-thread `gc_running_p'.

* libguile/gc.c (scm_gc): Don't use `scm_gc_running_p' as
  an lvalue.

* libguile/gc.h (scm_gc_running_p): Define to 0.

* libguile/threads.h (scm_i_thread)[gc_running_p]: Remove.
This commit is contained in:
Ludovic Courtès 2008-09-18 00:04:38 +02:00
parent f5cc9619df
commit 6033d3266c
4 changed files with 1 additions and 7 deletions

View file

@ -388,7 +388,6 @@ SCM_DEFINE (scm_gc, "gc", 0, 0, 0,
#define FUNC_NAME s_scm_gc
{
scm_i_scm_pthread_mutex_lock (&scm_i_sweep_mutex);
scm_gc_running_p = 1;
scm_i_gc ("call");
/* njrev: It looks as though other places, e.g. scm_realloc,
can call scm_i_gc without acquiring the sweep mutex. Does this
@ -397,7 +396,6 @@ SCM_DEFINE (scm_gc, "gc", 0, 0, 0,
(e.g. scm_permobjs above in scm_gc_stats) by a critical section,
not by the sweep mutex. Shouldn't all the GC-relevant objects be
protected in the same way? */
scm_gc_running_p = 0;
scm_i_pthread_mutex_unlock (&scm_i_sweep_mutex);
scm_c_hook_run (&scm_after_gc_c_hook, 0);
return SCM_UNSPECIFIED;

View file

@ -136,7 +136,7 @@ void scm_i_expensive_validation_check (SCM cell);
SCM_INTERNAL scm_i_pthread_mutex_t scm_i_gc_admin_mutex;
#define scm_gc_running_p (SCM_I_CURRENT_THREAD->gc_running_p)
#define scm_gc_running_p 0
SCM_INTERNAL scm_i_pthread_mutex_t scm_i_sweep_mutex;
#ifdef __ia64__

View file

@ -457,7 +457,6 @@ guilify_self_1 (SCM_STACKITEM *base)
/* XXX - check for errors. */
pipe (t->sleep_pipe);
scm_i_pthread_mutex_init (&t->admin_mutex, NULL);
t->gc_running_p = 0;
t->current_mark_stack_ptr = NULL;
t->current_mark_stack_limit = NULL;
t->canceled = 0;

View file

@ -66,9 +66,6 @@ typedef struct scm_i_thread {
scm_i_pthread_cond_t sleep_cond;
int sleep_fd, sleep_pipe[2];
int gc_running_p; /* non-zero while this thread does GC or a
sweep. */
/* Information about the Boehm-GC mark stack during the mark phase. This
is used by `scm_gc_mark ()'. */
void *current_mark_stack_ptr;