mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-04-30 03:40:34 +02:00
Rename scm_i_thread to scm_thread
* libguile/scm.h (struct scm_thread, scm_thread): Rename from scm_i_thread. * libguile/deprecated.h (scm_i_thread): Add deprecated typedef. * libguile/threads.h: Adapt to renaming. * libguile/intrinsics.h: * libguile/scmsigs.h: * libguile/cache-internal.h: Remove threads.h includes; unnecessary with the forward decl. * libguile/continuations.h: * libguile/gc-inline.h: * libguile/async.h: Adapt scm_thread type name change. * libguile/async.c: * libguile/continuations.c: * libguile/control.c: * libguile/dynstack.c: * libguile/dynwind.c: * libguile/eval.c: * libguile/finalizers.c: * libguile/fluids.c: * libguile/gc.c: * libguile/intrinsics.c: * libguile/load.c: * libguile/memoize.c: * libguile/print.c: * libguile/read.c: * libguile/scmsigs.c: * libguile/script.c: * libguile/stackchk.c: * libguile/stacks.c: * libguile/symbols.c: * libguile/threads.c: * libguile/throw.c: * libguile/vm-engine.c: * libguile/vm.c: Adapt to type name change, and add additional includes as needed.
This commit is contained in:
parent
51e35158ba
commit
5804c977d7
32 changed files with 124 additions and 115 deletions
|
@ -56,7 +56,7 @@
|
|||
*/
|
||||
|
||||
void
|
||||
scm_i_async_push (scm_i_thread *t, SCM proc)
|
||||
scm_i_async_push (scm_thread *t, SCM proc)
|
||||
{
|
||||
SCM asyncs;
|
||||
|
||||
|
@ -102,7 +102,7 @@ scm_i_async_push (scm_i_thread *t, SCM proc)
|
|||
|
||||
/* Precondition: there are pending asyncs. */
|
||||
SCM
|
||||
scm_i_async_pop (scm_i_thread *t)
|
||||
scm_i_async_pop (scm_thread *t)
|
||||
{
|
||||
while (1)
|
||||
{
|
||||
|
@ -140,7 +140,7 @@ scm_i_async_pop (scm_i_thread *t)
|
|||
void
|
||||
scm_async_tick (void)
|
||||
{
|
||||
scm_i_thread *t = SCM_I_CURRENT_THREAD;
|
||||
scm_thread *t = SCM_I_CURRENT_THREAD;
|
||||
|
||||
if (t->block_asyncs)
|
||||
return;
|
||||
|
@ -163,7 +163,7 @@ struct scm_thread_wake_data {
|
|||
};
|
||||
|
||||
int
|
||||
scm_i_prepare_to_wait (scm_i_thread *t,
|
||||
scm_i_prepare_to_wait (scm_thread *t,
|
||||
struct scm_thread_wake_data *wake)
|
||||
{
|
||||
if (t->block_asyncs)
|
||||
|
@ -183,13 +183,13 @@ scm_i_prepare_to_wait (scm_i_thread *t,
|
|||
}
|
||||
|
||||
void
|
||||
scm_i_wait_finished (scm_i_thread *t)
|
||||
scm_i_wait_finished (scm_thread *t)
|
||||
{
|
||||
scm_atomic_set_pointer ((void **)&t->wake, NULL);
|
||||
}
|
||||
|
||||
int
|
||||
scm_i_prepare_to_wait_on_fd (scm_i_thread *t, int fd)
|
||||
scm_i_prepare_to_wait_on_fd (scm_thread *t, int fd)
|
||||
{
|
||||
struct scm_thread_wake_data *wake;
|
||||
wake = scm_gc_typed_calloc (struct scm_thread_wake_data);
|
||||
|
@ -205,7 +205,7 @@ scm_c_prepare_to_wait_on_fd (int fd)
|
|||
}
|
||||
|
||||
int
|
||||
scm_i_prepare_to_wait_on_cond (scm_i_thread *t,
|
||||
scm_i_prepare_to_wait_on_cond (scm_thread *t,
|
||||
scm_i_pthread_mutex_t *m,
|
||||
scm_i_pthread_cond_t *c)
|
||||
{
|
||||
|
@ -242,7 +242,7 @@ SCM_DEFINE (scm_system_async_mark_for_thread, "system-async-mark", 1, 1, 0,
|
|||
"signal handlers.")
|
||||
#define FUNC_NAME s_scm_system_async_mark_for_thread
|
||||
{
|
||||
scm_i_thread *t;
|
||||
scm_thread *t;
|
||||
struct scm_thread_wake_data *wake;
|
||||
|
||||
if (SCM_UNBNDP (thread))
|
||||
|
@ -321,14 +321,14 @@ SCM_DEFINE (scm_noop, "noop", 0, 0, 1,
|
|||
static void
|
||||
increase_block (void *data)
|
||||
{
|
||||
scm_i_thread *t = data;
|
||||
scm_thread *t = data;
|
||||
t->block_asyncs++;
|
||||
}
|
||||
|
||||
static void
|
||||
decrease_block (void *data)
|
||||
{
|
||||
scm_i_thread *t = data;
|
||||
scm_thread *t = data;
|
||||
if (--t->block_asyncs == 0)
|
||||
scm_async_tick ();
|
||||
}
|
||||
|
@ -336,7 +336,7 @@ decrease_block (void *data)
|
|||
void
|
||||
scm_dynwind_block_asyncs (void)
|
||||
{
|
||||
scm_i_thread *t = SCM_I_CURRENT_THREAD;
|
||||
scm_thread *t = SCM_I_CURRENT_THREAD;
|
||||
scm_dynwind_rewind_handler (increase_block, t, SCM_F_WIND_EXPLICITLY);
|
||||
scm_dynwind_unwind_handler (decrease_block, t, SCM_F_WIND_EXPLICITLY);
|
||||
}
|
||||
|
@ -344,7 +344,7 @@ scm_dynwind_block_asyncs (void)
|
|||
void
|
||||
scm_dynwind_unblock_asyncs (void)
|
||||
{
|
||||
scm_i_thread *t = SCM_I_CURRENT_THREAD;
|
||||
scm_thread *t = SCM_I_CURRENT_THREAD;
|
||||
if (t->block_asyncs == 0)
|
||||
scm_misc_error ("scm_with_unblocked_asyncs",
|
||||
"asyncs already unblocked", SCM_EOL);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue