diff options
author | Marius Vollmer <mvo@zagadka.de> | 2005-12-06 20:27:59 +0000 |
---|---|---|
committer | Marius Vollmer <mvo@zagadka.de> | 2005-12-06 20:27:59 +0000 |
commit | 54428bb84e2f212d6c24ef5264780d88fd31da60 (patch) | |
tree | 5f1acf0d1532178e3bc7b7228d177fce11b7bb3b | |
parent | b54df25486b29f4759b71d3c1af51010e26fc2f3 (diff) | |
download | guile-54428bb84e2f212d6c24ef5264780d88fd31da60.tar.gz |
Removed scm_leave_guile, scm_enter_guile and all references to
them since they are no longer in the API.
-rw-r--r-- | doc/ref/api-init.texi | 10 | ||||
-rw-r--r-- | doc/ref/api-scheduling.texi | 34 | ||||
-rw-r--r-- | doc/ref/libguile-concepts.texi | 21 |
3 files changed, 27 insertions, 38 deletions
diff --git a/doc/ref/api-init.texi b/doc/ref/api-init.texi index 651b2b98f..26e6e71ef 100644 --- a/doc/ref/api-init.texi +++ b/doc/ref/api-init.texi @@ -13,9 +13,9 @@ put itself into guile mode with either @code{scm_with_guile} or @code{scm_init_guile}. The global state of Guile is initialized automatically when the first thread enters guile mode. -When a thread wants to block outside of a Guile API function, it should -leave guile mode temporarily with either @code{scm_without_guile} or -@code{scm_leave_guile}, @xref{Blocking}. +When a thread wants to block outside of a Guile API function, it +should leave guile mode temporarily with @code{scm_without_guile}, +@xref{Blocking}. Threads that are created by @code{call-with-new-thread} or @code{scm_spawn_thread} start out in guile mode so you don't need to @@ -51,8 +51,8 @@ See @code{scm_init_guile} for another approach at initializing Guile that does not have this restriction. It is OK to call @code{scm_with_guile} while a thread has temporarily -left guile mode via @code{scm_without_guile} or @code{scm_leave_guile}. -It will then simply temporarily enter guile mode again. +left guile mode via @code{scm_without_guile}. It will then simply +temporarily enter guile mode again. @end deftypefn @deftypefn {C Function} void scm_init_guile () diff --git a/doc/ref/api-scheduling.texi b/doc/ref/api-scheduling.texi index c7867b7df..00e8befe1 100644 --- a/doc/ref/api-scheduling.texi +++ b/doc/ref/api-scheduling.texi @@ -452,30 +452,20 @@ guile mode. The following functions can be used to temporily leave guile mode or to perform some common blocking operations in a supported way. -@deftypefn {C Function} scm_t_guile_ticket scm_leave_guile () -@deftypefnx {C Function} void scm_enter_guile (scm_t_guile_ticket ticket) -These two functions must be called as a pair and can be used to leave -guile mode temporarily. The call to @code{scm_leave_guile} returns a -ticket that must be used with @code{scm_enter_guile} to match up the two -calls. +@deftypefn {C Function} {void *} scm_without_guile (void *(*func) (void *), void *data) +Leave guile mode, call @var{func} on @var{data}, enter guile mode and +return the result of calling @var{func}. While a thread has left guile mode, it must not call any libguile -functions except @code{scm_enter_guile}, @code{scm_with_guile}, -@code{scm_without_guile} or @code{scm_leave_guile} and must not use any -libguile macros. Also, local variables of type @code{SCM} that are -allocated while not in guile mode are not protected from the garbage -collector. - -When used from non-guile mode, a pair of calls to @code{scm_leave_guile} -and @code{scm_enter_guile} do nothing. In that way, you can leave guile -mode without having to know whether the current thread is in guile mode -or not. -@end deftypefn - -@deftypefn {C Function} {void *} scm_without_guile (void *(*func) (void *), void *data) -Leave guile mode as with @code{scm_leave_guile}, call @var{func} on -@var{data}, enter guile mode as with @code{scm_enter_guile} and return -the result of calling @var{func}. +functions except @code{scm_with_guile} or @code{scm_without_guile} and +must not use any libguile macros. Also, local variables of type +@code{SCM} that are allocated while not in guile mode are not +protected from the garbage collector. + +When used from non-guile mode, calling @code{scm_without_guile} is +still allowed: it simply calls @var{func}. In that way, you can leave +guile mode without having to know whether the current thread is in +guile mode or not. @end deftypefn @deftypefn {C Function} int scm_pthread_mutex_lock (pthread_mutex_t *mutex) diff --git a/doc/ref/libguile-concepts.texi b/doc/ref/libguile-concepts.texi index dca61058f..c969bdaa9 100644 --- a/doc/ref/libguile-concepts.texi +++ b/doc/ref/libguile-concepts.texi @@ -451,17 +451,16 @@ that are stored in local variables. When a thread puts itself into guile mode for the first time, it gets a Scheme representation and is listed by @code{all-threads}, for example. -While in guile mode, a thread promises to reach a safe point reasonably -frequently (@pxref{Asynchronous Signals}). In addition to running -signal handlers, these points are also potential rendezvous points of -all guile mode threads where Guile can orchestrate global things like -garbage collection. Consequently, when a thread in guile mode blocks -and does no longer frequent safe points, it might cause all other guile -mode threads to block as well. To prevent this from happening, a guile -mode thread should either only block in libguile functions (who know how -to do it right), or should temporarily leave guile mode with -@code{scm_without_guile} or -@code{scm_leave_guile}/@code{scm_enter_guile}. +While in guile mode, a thread promises to reach a safe point +reasonably frequently (@pxref{Asynchronous Signals}). In addition to +running signal handlers, these points are also potential rendezvous +points of all guile mode threads where Guile can orchestrate global +things like garbage collection. Consequently, when a thread in guile +mode blocks and does no longer frequent safe points, it might cause +all other guile mode threads to block as well. To prevent this from +happening, a guile mode thread should either only block in libguile +functions (who know how to do it right), or should temporarily leave +guile mode with @code{scm_without_guile}. For some common blocking operations, Guile provides convenience functions. For example, if you want to lock a pthread mutex while in |