guile-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Guile-commits] GNU Guile branch, stable-2.0, updated. v2.0.1-33-ga2a6c0


From: Andy Wingo
Subject: [Guile-commits] GNU Guile branch, stable-2.0, updated. v2.0.1-33-ga2a6c0e
Date: Thu, 05 May 2011 22:17:45 +0000

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU Guile".

http://git.savannah.gnu.org/cgit/guile.git/commit/?id=a2a6c0e319b5c146c484cb1fe8ffc9b14b9a9876

The branch, stable-2.0 has been updated
       via  a2a6c0e319b5c146c484cb1fe8ffc9b14b9a9876 (commit)
      from  a2230b653b86cece1daab09315873b5a4c592d6b (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit a2a6c0e319b5c146c484cb1fe8ffc9b14b9a9876
Author: Andy Wingo <address@hidden>
Date:   Fri May 6 00:17:35 2011 +0200

    avoid tls gets when handling interrupts in the vm
    
    * libguile/__scm.h (SCM_ASYNC_TICK_WITH_CODE): Redefine to take a
      scm_i_thread* as well.  OK to do because it's within a
      BUILDING_LIBGUILE block.
    
    * libguile/vm-engine.c (vm_engine): Cache the scm_i_thread* instead of
      the dynstate, so we can use the thread for ticks.
    
    * libguile/vm-engine.h (VM_HANDLE_INTERRUPTS): Tick with the
      scm_i_thread* local var, to avoid excessive tls calls.
    
    * libguile/vm-i-system.c: Fix dynstate users to use
      current_thread->dynamic_state.

-----------------------------------------------------------------------

Summary of changes:
 libguile/__scm.h       |    4 ++--
 libguile/vm-engine.c   |    2 +-
 libguile/vm-engine.h   |    2 +-
 libguile/vm-i-system.c |    8 ++++----
 4 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/libguile/__scm.h b/libguile/__scm.h
index 2bfb4f6..f5551ad 100644
--- a/libguile/__scm.h
+++ b/libguile/__scm.h
@@ -536,10 +536,10 @@ SCM_API void scm_async_tick (void);
     while (0)
 
 /* SCM_ASYNC_TICK_WITH_CODE is only available to Guile itself */
-# define SCM_ASYNC_TICK_WITH_CODE(stmt)                                 \
+# define SCM_ASYNC_TICK_WITH_CODE(thr, stmt)                            \
     do                                                                  \
       {                                                                 \
-       if (SCM_UNLIKELY (SCM_I_CURRENT_THREAD->pending_asyncs))        \
+       if (SCM_UNLIKELY (thr->pending_asyncs))                         \
          {                                                             \
             stmt;                                                       \
             scm_async_click ();                                         \
diff --git a/libguile/vm-engine.c b/libguile/vm-engine.c
index bfa8489..e449b43 100644
--- a/libguile/vm-engine.c
+++ b/libguile/vm-engine.c
@@ -52,7 +52,7 @@ VM_NAME (SCM vm, SCM program, SCM *argv, int nargs)
 #endif
   SCM *stack_limit = vp->stack_limit;  /* stack limit address */
 
-  SCM dynstate = SCM_I_CURRENT_THREAD->dynamic_state;
+  scm_i_thread *current_thread = SCM_I_CURRENT_THREAD;
   scm_t_int64 vm_cookie = vp->cookie++;
 
   /* Internal variables */
diff --git a/libguile/vm-engine.h b/libguile/vm-engine.h
index abbc110..146931e 100644
--- a/libguile/vm-engine.h
+++ b/libguile/vm-engine.h
@@ -244,7 +244,7 @@
   RUN_HOOK (SCM_VM_RESTORE_CONTINUATION_HOOK)
 
 #define VM_HANDLE_INTERRUPTS                     \
-  SCM_ASYNC_TICK_WITH_CODE (SYNC_REGISTER ())
+  SCM_ASYNC_TICK_WITH_CODE (current_thread, SYNC_REGISTER ())
 
 
 /*
diff --git a/libguile/vm-i-system.c b/libguile/vm-i-system.c
index ea00fc9..0ff411f 100644
--- a/libguile/vm-i-system.c
+++ b/libguile/vm-i-system.c
@@ -1635,7 +1635,7 @@ VM_DEFINE_INSTRUCTION (89, wind_fluids, "wind-fluids", 1, 
-1, 0)
   wf = scm_i_make_with_fluids (n, sp + 1, sp + 1 + n);
   NULLSTACK (2 * n);
 
-  scm_i_swap_with_fluids (wf, dynstate);
+  scm_i_swap_with_fluids (wf, current_thread->dynamic_state);
   scm_i_set_dynwinds (scm_cons (wf, scm_i_dynwinds ()));
   NEXT;
 }
@@ -1645,7 +1645,7 @@ VM_DEFINE_INSTRUCTION (90, unwind_fluids, 
"unwind-fluids", 0, 0, 0)
   SCM wf;
   wf = scm_car (scm_i_dynwinds ());
   scm_i_set_dynwinds (scm_cdr (scm_i_dynwinds ()));
-  scm_i_swap_with_fluids (wf, dynstate);
+  scm_i_swap_with_fluids (wf, current_thread->dynamic_state);
   NEXT;
 }
 
@@ -1655,7 +1655,7 @@ VM_DEFINE_INSTRUCTION (91, fluid_ref, "fluid-ref", 0, 1, 
1)
   SCM fluids;
   
   CHECK_UNDERFLOW ();
-  fluids = SCM_I_DYNAMIC_STATE_FLUIDS (dynstate);
+  fluids = SCM_I_DYNAMIC_STATE_FLUIDS (current_thread->dynamic_state);
   if (SCM_UNLIKELY (!SCM_FLUID_P (*sp))
       || ((num = SCM_I_FLUID_NUM (*sp)) >= SCM_SIMPLE_VECTOR_LENGTH (fluids)))
     {
@@ -1683,7 +1683,7 @@ VM_DEFINE_INSTRUCTION (92, fluid_set, "fluid-set", 0, 2, 
0)
   SCM val, fluid, fluids;
   
   POP2 (val, fluid);
-  fluids = SCM_I_DYNAMIC_STATE_FLUIDS (dynstate);
+  fluids = SCM_I_DYNAMIC_STATE_FLUIDS (current_thread->dynamic_state);
   if (SCM_UNLIKELY (!SCM_FLUID_P (fluid))
       || ((num = SCM_I_FLUID_NUM (fluid)) >= SCM_SIMPLE_VECTOR_LENGTH 
(fluids)))
     {


hooks/post-receive
-- 
GNU Guile



reply via email to

[Prev in Thread] Current Thread [Next in Thread]