1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-06-19 02:00:26 +02:00

Remove code intended to put threads to sleep.

Actually, threads would "go to sleep" either by blocking on a heap
allocation, or by noticing `scm_i_thread_go_to_sleep' is set when
running `SCM_TICK', which limits the applicability of this technique
(e.g., it was not appropriate for the shared string code).

* libguile/threads.c (scm_i_thread_go_to_sleep, scm_i_thread_put_to_sleep,
  scm_i_thread_invalidate_freelists, scm_i_thread_wake_up,
  scm_i_thread_sleep_for_gc): Remove.

* libguile/threads.h (scm_i_thread_go_to_sleep, scm_i_thread_put_to_sleep,
  scm_i_thread_invalidate_freelists, scm_i_thread_wake_up,
  scm_i_thread_sleep_for_gc): Remove declarations.
  (SCM_THREAD_SWITCHING_CODE): Do nothing.
This commit is contained in:
Ludovic Courtès 2008-09-17 22:58:32 +02:00
parent 902578f15a
commit 43adae308c
2 changed files with 1 additions and 64 deletions

View file

@ -146,13 +146,6 @@ SCM_INTERNAL void *scm_i_with_guile_and_parent (void *(*func)(void *),
void *data, SCM parent);
extern int scm_i_thread_go_to_sleep;
SCM_INTERNAL void scm_i_thread_put_to_sleep (void);
SCM_INTERNAL void scm_i_thread_wake_up (void);
SCM_INTERNAL void scm_i_thread_invalidate_freelists (void);
void scm_i_thread_sleep_for_gc (void);
void scm_threads_prehistory (SCM_STACKITEM *);
void scm_threads_init_first_thread (void);
@ -162,10 +155,7 @@ SCM_INTERNAL void scm_init_threads_default_dynamic_state (void);
#define SCM_THREAD_SWITCHING_CODE \
do { \
if (scm_i_thread_go_to_sleep) \
scm_i_thread_sleep_for_gc (); \
} while (0)
do { } while (0)
SCM_API SCM scm_call_with_new_thread (SCM thunk, SCM handler);
SCM_API SCM scm_yield (void);