From 3d9a28eb502a37cb5317d09dcfd80aa9dbdeca27 Mon Sep 17 00:00:00 2001 From: Kevin Tew Date: Wed, 5 May 2010 06:36:24 -0600 Subject: [PATCH] [Places] remove unneeded jit_lock --- src/racket/src/env.c | 4 ---- src/racket/src/jit.c | 47 ---------------------------------------- src/racket/src/schpriv.h | 3 --- 3 files changed, 54 deletions(-) diff --git a/src/racket/src/env.c b/src/racket/src/env.c index 9431fab718..247e0641c1 100644 --- a/src/racket/src/env.c +++ b/src/racket/src/env.c @@ -476,10 +476,6 @@ static Scheme_Env *place_instance_init(void *stack_base, int initial_main_os_thr printf("process @ %ld\n", scheme_get_process_milliseconds()); #endif -#ifdef MZ_USE_JIT - scheme_init_jit(); -#endif - /* error handling and buffers */ /* this check prevents initializing orig ports twice for the first initial * place. The kernel initializes orig_ports early. */ diff --git a/src/racket/src/jit.c b/src/racket/src/jit.c index 699d2ee319..5a23c246c7 100644 --- a/src/racket/src/jit.c +++ b/src/racket/src/jit.c @@ -738,41 +738,6 @@ static void emit_indentation(mz_jit_state *jitter) # define LOG_IT(args) /* empty */ #endif -/*========================================================================*/ -/* initialization */ -/*========================================================================*/ - -#ifdef MZ_USE_PLACES - -THREAD_LOCAL_DECL(static mzrt_mutex *jit_lock); -THREAD_LOCAL_DECL(static int in_jit_critical_section); - -static void BEGIN_JIT_CRITICAL_SECTION() -{ - if (!in_jit_critical_section) - mzrt_mutex_lock(jit_lock); - in_jit_critical_section++; -} - -static void END_JIT_CRITICAL_SECTION() -{ - --in_jit_critical_section; - if (!in_jit_critical_section) - mzrt_mutex_unlock(jit_lock); -} - -#else -# define BEGIN_JIT_CRITICAL_SECTION() /* empty */ -# define END_JIT_CRITICAL_SECTION() /* empty */ -#endif - -void scheme_init_jit() -{ -#ifdef MZ_USE_PLACES - mzrt_mutex_create(&jit_lock); -#endif -} - /*========================================================================*/ /* run time */ /*========================================================================*/ @@ -8765,12 +8730,8 @@ Scheme_Native_Closure_Data *scheme_generate_case_lambda(Scheme_Case_Lambda *c) { Scheme_Native_Closure_Data *ndata; - BEGIN_JIT_CRITICAL_SECTION(); - ndata = create_native_case_lambda(c); - END_JIT_CRITICAL_SECTION(); - return ndata; } @@ -12511,11 +12472,7 @@ static void on_demand_generate_lambda(Scheme_Native_Closure *nc, int argc, Schem void scheme_on_demand_generate_lambda(Scheme_Native_Closure *nc, int argc, Scheme_Object **argv) { - BEGIN_JIT_CRITICAL_SECTION(); - on_demand_generate_lambda(nc, argc, argv); - - END_JIT_CRITICAL_SECTION(); } static void on_demand_with_args(Scheme_Object **in_argv) @@ -12582,12 +12539,8 @@ Scheme_Native_Closure_Data *scheme_generate_lambda(Scheme_Closure_Data *data, in { Scheme_Native_Closure_Data *ndata; - BEGIN_JIT_CRITICAL_SECTION(); - ndata = create_native_lambda(data, clear_code_after_jit, case_lam); - END_JIT_CRITICAL_SECTION(); - return ndata; } diff --git a/src/racket/src/schpriv.h b/src/racket/src/schpriv.h index 4f3152dab8..bfd09ee531 100644 --- a/src/racket/src/schpriv.h +++ b/src/racket/src/schpriv.h @@ -234,9 +234,6 @@ void scheme_init_dynamic_extension(Scheme_Env *env); extern void scheme_regexp_initialize(Scheme_Env *env); #endif void scheme_init_salloc(void); -#ifdef MZ_USE_JIT -void scheme_init_jit(void); -#endif void scheme_init_memtrace(Scheme_Env *env); void scheme_init_paramz(Scheme_Env *env); void scheme_init_parameterization();