guile-commits
[Top][All Lists]
Advanced

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

[Guile-commits] 01/03: Rearrange scm_thread for better locality


From: Andy Wingo
Subject: [Guile-commits] 01/03: Rearrange scm_thread for better locality
Date: Thu, 20 Jun 2019 08:17:34 -0400 (EDT)

wingo pushed a commit to branch master
in repository guile.

commit 117bb3badeee5b5f803a93acba8197540cab4fb6
Author: Andy Wingo <address@hidden>
Date:   Thu Jun 20 13:37:47 2019 +0200

    Rearrange scm_thread for better locality
    
    * libguile/threads.h (struct scm_thread): Move async-related bits up, so
      that the VM can access them easier.  Likewise for freelists (which we
      will inline soon).
---
 libguile/threads.h | 24 ++++++++++++------------
 1 file changed, 12 insertions(+), 12 deletions(-)

diff --git a/libguile/threads.h b/libguile/threads.h
index 7ebd377..d3de35b 100644
--- a/libguile/threads.h
+++ b/libguile/threads.h
@@ -1,7 +1,7 @@
 #ifndef SCM_THREADS_H
 #define SCM_THREADS_H
 
-/* Copyright 1996-1998,2000-2004,2006-2009,2011-2014,2018
+/* Copyright 1996-1998,2000-2004,2006-2009,2011-2014,2018-2019
      Free Software Foundation, Inc.
 
    This file is part of Guile.
@@ -52,6 +52,17 @@ struct scm_thread {
   /* VM state for this thread.  */
   struct scm_vm vm;
 
+  /* For system asyncs.
+   */
+  SCM pending_asyncs;            /* The thunks to be run at the next
+                                    safe point.  Accessed atomically. */
+  unsigned int block_asyncs;    /* Non-zero means that asyncs should
+                                   not be run. */
+
+  /* Thread-local freelists; see gc-inline.h.  */
+  void **freelists;
+  void **pointerless_freelists;
+
   SCM handle;
   scm_i_pthread_t pthread;
 
@@ -68,10 +79,6 @@ struct scm_thread {
   scm_i_pthread_cond_t sleep_cond;
   int sleep_pipe[2];
 
-  /* Thread-local freelists; see gc-inline.h.  */
-  void **freelists;
-  void **pointerless_freelists;
-
   /* Other thread local things.
    */
   scm_t_dynamic_state *dynamic_state;
@@ -79,13 +86,6 @@ struct scm_thread {
   /* The dynamic stack.  */
   scm_t_dynstack dynstack;
 
-  /* For system asyncs.
-   */
-  SCM pending_asyncs;            /* The thunks to be run at the next
-                                    safe point.  Accessed atomically. */
-  unsigned int block_asyncs;    /* Non-zero means that asyncs should
-                                   not be run. */
-
   /* The current continuation root and the stack base for it.
 
      The continuation root is an arbitrary but unique object that



reply via email to

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