diff options
author | Andy Wingo <wingo@pobox.com> | 2018-06-26 11:25:07 +0200 |
---|---|---|
committer | Andy Wingo <wingo@pobox.com> | 2018-06-26 11:25:07 +0200 |
commit | 51e35158bad42b8db28e9272ebb279f17b76dbe4 (patch) | |
tree | 02370d3b367571aed28154df7cfc23d0b7dd5bf7 /libguile/threads.h | |
parent | 185d19dfb1a570c3075fa8f1a653334412ae6b85 (diff) | |
download | guile-51e35158bad42b8db28e9272ebb279f17b76dbe4.tar.gz |
Refactor continuation capture in VM
* libguile/continuations.h:
* libguile/continuations.c (scm_i_make_continuation): Refactor to expect
registers to already be captured.
* libguile/scm.h (scm_i_thread): Add forward decl.
* libguile/threads.h (struct scm_i_thread): Just fill in the struct
type.
* libguile/vm-engine.c (call/cc); Use the registers already captured
before entering the VM.
Diffstat (limited to 'libguile/threads.h')
-rw-r--r-- | libguile/threads.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/libguile/threads.h b/libguile/threads.h index 50d4ba158..9f0ccc5aa 100644 --- a/libguile/threads.h +++ b/libguile/threads.h @@ -48,7 +48,7 @@ SCM_API scm_t_bits scm_tc16_condvar; struct scm_thread_wake_data; -typedef struct scm_i_thread { +struct scm_i_thread { struct scm_i_thread *next_thread; SCM handle; @@ -105,7 +105,7 @@ typedef struct scm_i_thread { struct scm_vm vm; SCM_STACKITEM *base; jmp_buf regs; -} scm_i_thread; +}; #define SCM_I_IS_THREAD(x) SCM_SMOB_PREDICATE (scm_tc16_thread, x) #define SCM_I_THREAD_DATA(x) ((scm_i_thread *) SCM_SMOB_DATA (x)) |