mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-04-30 03:40:34 +02:00
Arrange so that `SCM_I_CURRENT_THREAD' is not accessed outside of libguile.
* libguile/__scm.h (scm_async_tick): New declaration. (SCM_ASYNC_TICK)[!BUILDING_LIBGUILE]: Use `scm_async_tick ()'. * libguile/async.c (scm_critical_section_start, scm_critical_section_end, scm_async_tick): New functions. * libguile/async.h (scm_i_critical_section_mutex): Made internal. (scm_critical_section_start, scm_critical_section_end): New declarations. (SCM_CRITICAL_SECTION_START, SCM_CRITICAL_SECTION_END)[!BUILDING_LIBGUILE]: Use the same-named function (lower-case). * libguile/stackchk.h (SCM_STACK_OVERFLOW_P): Conditionalize on `BUILDING_LIBGUILE'. * libguile/threads.h (SCM_I_CURRENT_THREAD, scm_i_dynwinds, scm_i_set_dynwinds, scm_i_last_debug_frame, scm_i_set_last_debug_frame): Conditionalize on `BUILDING_LIBGUILE'.
This commit is contained in:
parent
b8ec9daba6
commit
46935a1fac
5 changed files with 79 additions and 26 deletions
|
@ -472,6 +472,29 @@ scm_dynwind_unblock_asyncs ()
|
|||
scm_dynwind_unwind_handler (increase_block, t, SCM_F_WIND_EXPLICITLY);
|
||||
}
|
||||
|
||||
|
||||
/* These are function variants of the same-named macros (uppercase) for use
|
||||
outside of libguile. This is so that `SCM_I_CURRENT_THREAD', which may
|
||||
reside in TLS, is not accessed from outside of libguile. It thus allows
|
||||
libguile to be built with the "local-dynamic" TLS model. */
|
||||
|
||||
void
|
||||
scm_critical_section_start (void)
|
||||
{
|
||||
SCM_CRITICAL_SECTION_START;
|
||||
}
|
||||
|
||||
void
|
||||
scm_critical_section_end (void)
|
||||
{
|
||||
SCM_CRITICAL_SECTION_END;
|
||||
}
|
||||
|
||||
void
|
||||
scm_async_tick (void)
|
||||
{
|
||||
SCM_ASYNC_TICK;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue