mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-06-10 14:00:21 +02:00
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).
This commit is contained in:
parent
cce222d189
commit
117bb3bade
1 changed files with 12 additions and 12 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue